fix: update go.sour.is/pkg
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
xuu
2023-09-29 10:21:29 -06:00
parent ee45a0fd49
commit bdda63edac
5 changed files with 70 additions and 465 deletions

View File

@@ -30,13 +30,13 @@ const CachSize = 1000
const AppendOnly = ev.AppendOnly
const AllEvents = ev.AllEvents
type lockedWal = locker.Locked[wal.Log]
type lockedWal = locker.Locked[*wal.Log]
type openlogs struct {
logs *cache.Cache[string, *lockedWal]
}
type diskStore struct {
path string
openlogs *locker.Locked[openlogs]
openlogs *locker.Locked[*openlogs]
m_disk_open metric.Int64Counter
m_disk_evict metric.Int64Counter
@@ -173,7 +173,7 @@ func (d *diskStore) EventLog(ctx context.Context, streamID string) (driver.Event
type eventLog struct {
streamID string
events *locker.Locked[wal.Log]
events *locker.Locked[*wal.Log]
diskStore *diskStore
}

View File

@@ -18,10 +18,10 @@ const AppendOnly = ev.AppendOnly
const AllEvents = ev.AllEvents
type state struct {
streams map[string]*locker.Locked[event.Events]
streams map[string]*locker.Locked[*event.Events]
}
type memstore struct {
state *locker.Locked[state]
state *locker.Locked[*state]
}
var _ driver.Driver = (*memstore)(nil)
@@ -37,7 +37,7 @@ func (memstore) Open(ctx context.Context, name string) (driver.Driver, error) {
_, span := lg.Span(ctx)
defer span.End()
s := &state{streams: make(map[string]*locker.Locked[event.Events])}
s := &state{streams: make(map[string]*locker.Locked[*event.Events])}
return &memstore{locker.New(s)}, nil
}
func (m *memstore) EventLog(ctx context.Context, streamID string) (driver.EventLog, error) {
@@ -66,7 +66,7 @@ func (m *memstore) EventLog(ctx context.Context, streamID string) (driver.EventL
type eventLog struct {
streamID string
events *locker.Locked[event.Events]
events *locker.Locked[*event.Events]
}
var _ driver.EventLog = (*eventLog)(nil)

View File

@@ -22,7 +22,7 @@ type state struct {
}
type streamer struct {
state *locker.Locked[state]
state *locker.Locked[*state]
up driver.Driver
}
@@ -216,7 +216,7 @@ type position struct {
type subscription struct {
topic string
position *locker.Locked[position]
position *locker.Locked[*position]
events driver.EventLog
unsub func(context.Context) error