Documentation
¶
Index ¶
Constants ¶
View Source
const ( DeletedStatusKey = "d" HeadsCollectionName = "heads" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeletedStatus ¶
type DeletedStatus int
const ( DeletedStatusNotDeleted DeletedStatus = iota DeletedStatusQueued DeletedStatusDeleted )
type EntryIterator ¶
type EntryIterator func(entry HeadsEntry) (bool, error)
type HeadStorage ¶
type HeadStorage interface {
AddObserver(observer Observer)
IterateEntries(ctx context.Context, iterOpts IterOpts, iter EntryIterator) error
GetEntry(ctx context.Context, id string) (HeadsEntry, error)
DeleteEntryTx(txCtx context.Context, id string) error
UpdateEntryTx(txCtx context.Context, update HeadsUpdate) error
UpdateEntry(ctx context.Context, update HeadsUpdate) error
}
type HeadsEntry ¶
type HeadsEntry struct {
Id string
Heads []string
CommonSnapshot string
DeletedStatus DeletedStatus
IsDerived bool
}
type HeadsUpdate ¶
type HeadsUpdate struct {
Id string
Heads []string
CommonSnapshot *string
DeletedStatus *DeletedStatus
IsDerived *bool
}
type Observer ¶
type Observer interface {
OnUpdate(update HeadsUpdate)
}
Click to show internal directories.
Click to hide internal directories.