Documentation ¶
Index ¶
- Variables
- func MatchType(o any) index.Entry
- func TestDelete(t *testing.T, save Save, del Delete, checkRef CheckRef, sel index.SelectIndex, ...)
- func TestEmbeddingSameObject(t *testing.T, save SaveEntity, del Delete, updateIndex UpdateIndex, ...)
- func TestFetch(t *testing.T, fetch Fetch, save SaveEntity, wg *pr2.WaitGroup)
- func TestGC(t *testing.T, store store.Store, saveEntity SaveEntity, fetch Fetch, gc GC, ...)
- func TestGCWithEmptyIndex(t *testing.T, save Save, newMemStore storemem.New, scope Scope, gc GC, ...)
- func TestIndex(t *testing.T, store store.Store, save SaveEntity, fetch Fetch, ...)
- func TestIntegrity(t *testing.T, saveEntity SaveEntity, store Store, wg *pr2.WaitGroup)
- func TestLock(t *testing.T, newHashState key.NewHashState)
- func TestNewName(t *testing.T, newName NewName, machineName naming.MachineName)
- func TestPush(t *testing.T, newMem storemem.New, newKV storekv.New, scope Scope, ...)
- func TestSave(t *testing.T, save SaveEntity, store store.Store, rebuildIndex RebuildIndex, ...)
- func TestSummary(t *testing.T, save SaveEntity, wg *pr2.WaitGroup)
- func TestSummaryUpdate(t *testing.T, save Save, fetch Fetch, checkRef CheckRef, cleanIndex CleanIndex, ...)
- type BeingRefered
- type CheckRef
- type CheckRefOption
- type CleanIndex
- type CleanIndexOption
- type DeadObject
- type Def
- func (Def) CheckRef(store Store, parallel sys.Parallel) CheckRef
- func (Def) CleanIndex(deleteIndex DeleteIndex, store store.Store) CleanIndex
- func (Def) Delete(fetch Fetch, store Store, index Index, sel index.SelectIndex, ...) Delete
- func (Def) DeleteIndex(index Index, parallel sys.Parallel) DeleteIndex
- func (_ Def) DeleteSummary(store store.Store, index Index, locks *_EntityLocks, ...) DeleteSummary
- func (_ Def) EntityLocks() *_EntityLocks
- func (Def) Fetch(store store.Store, newHashState key.NewHashState) Fetch
- func (Def) GC(store Store, selIndex index.SelectIndex, index Index, parallel sys.Parallel, ...) GC
- func (_ Def) HashIndexSet(newHashState key.NewHashState) HashIndexSet
- func (Def) IdxReferToFuncs() (add OnSummaryIndexAdd, del OnSummaryIndexDelete)
- func (_ Def) IdxReferedByFuncs() (add OnSummaryIndexAdd, del OnSummaryIndexDelete)
- func (Def) IdxSummaryKeyFuncs() (add OnSummaryIndexAdd, del OnSummaryIndexDelete)
- func (Def) IdxSummaryOfFuncs() (add OnSummaryIndexAdd, del OnSummaryIndexDelete)
- func (Def) IndexFuncs(store Store, saveSummary SaveSummary, sel index.SelectIndex, ...) (rebuild RebuildIndex, update UpdateIndex)
- func (Def) IndexGC(store Store, newMem storemem.New, scope dscope.Scope, newKV storekv.New, ...) IndexGC
- func (_ Def) NewName(machineName naming.MachineName, index Index) NewName
- func (Def) Push(scope dscope.Scope, selIndex index.SelectIndex, store Store, fetch Fetch, ...) Push
- func (Def) Resave(sel index.SelectIndex, fetch Fetch, save Save, parallel sys.Parallel) Resave
- func (Def) Save(store store.Store, scope dscope.Scope, newHashState key.NewHashState, ...) (save Save)
- func (Def) SaveEntity(save Save) SaveEntity
- func (_ Def) SaveSummary(store store.Store, sel index.SelectIndex, fetch Fetch, index Index, ...) SaveSummary
- func (_ Def) SummaryIndexFuncs(sel index.SelectIndex) (add OnSummaryIndexAdd, del OnSummaryIndexDelete)
- type Delete
- type DeleteIndex
- type DeleteIndexOption
- type DeleteSummary
- type Fetch
- type GC
- type GCOption
- type HasIndex
- type HasSlotKeys
- type Hash
- type HashIndexSet
- type IgnoreSummary
- type Index
- type IndexEntry
- type IndexGC
- type IndexGCOption
- type IndexManager
- type IndexOption
- type IndexPreEntry
- type IndexSaveOption
- type IndexSet
- type IndexTapEntry
- type Key
- type KeyPath
- type Limit
- type Name
- type NewHashState
- type NewName
- type OnSummaryIndexAdd
- type OnSummaryIndexDelete
- type Order
- type Parallel
- type Push
- type PushOption
- type RebuildIndex
- type Resave
- type ResaveOption
- type Save
- type SaveEntity
- type SaveOption
- type SaveOptions
- type SaveSummary
- type SaveSummaryOption
- type SaveSummaryOptions
- type SaveValue
- type Scope
- type Store
- type Summary
- type TapBadSummary
- type TapDeadObjects
- type TapDeleteIndex
- type TapEntry
- type TapIterKey
- type TapKey
- type TapMarkKey
- type TapPushCheckSummary
- type TapPushSave
- type TapReachableObjects
- type TapSummary
- type TapSweepDeadObject
- type TapTokens
- type TapWriteResult
- type UpdateIndex
- type WithIndexSaveOptions
- type WriteOption
- type WriteResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Select = index.Select Desc = index.Desc Tap = index.Tap Unmarshal = index.Unmarshal TapPre = index.TapPre Count = index.Count Asc = index.Asc NewEntry = index.NewEntry MatchEntry = index.MatchEntry MatchPreEntry = index.MatchPreEntry ErrKeyNotFound = store.ErrKeyNotFound ErrKeyNotMatch = store.ErrKeyNotMatch )
View Source
var IdxEmbeddedBy = idxEmbeddedBy{}
View Source
var IdxName = idxName(func(name Name) IndexEntry { return NewEntry(idxName(nil), name) })
View Source
var IdxPairObjectReferred = idxReferTo{}
View Source
var IdxPairObjectSummary = idxSummaryKey{}
View Source
var IdxPairReferredObject = idxReferedBy{}
View Source
var IdxPairSummaryObject = idxSummaryOf{}
View Source
var IdxReferTo = idxReferTo{}
View Source
var IdxReferedBy = idxReferedBy{}
View Source
var IdxSummaryKey = idxSummaryKey{}
View Source
var IdxSummaryOf = idxSummaryOf{}
View Source
var IdxTest = idxTest{}
View Source
var IdxType = idxType(func(_type string) IndexEntry { return NewEntry(idxType(nil), _type) })
View Source
var IdxVersion = idxVersion(func(version int64) IndexEntry { return NewEntry(idxVersion(nil), version) })
View Source
var NSEntity = key.Namespace{'c', '-', 'e', 'n', 't', 'i', 't', 'y'}
View Source
var NSSummary = key.Namespace{'c', '-', 's', 'u', 'm', 'a', 'r', 'y'}
Functions ¶
func TestDelete ¶
func TestEmbeddingSameObject ¶
func TestEmbeddingSameObject( t *testing.T, save SaveEntity, del Delete, updateIndex UpdateIndex, sel index.SelectIndex, wg *pr2.WaitGroup, )
func TestGCWithEmptyIndex ¶
func TestIntegrity ¶
func TestNewName ¶
func TestNewName( t *testing.T, newName NewName, machineName naming.MachineName, )
func TestSave ¶
func TestSave( t *testing.T, save SaveEntity, store store.Store, rebuildIndex RebuildIndex, updateIndex UpdateIndex, checkRef CheckRef, cleanIndex CleanIndex, newMemStore storemem.New, scope Scope, newHashState NewHashState, index Index, resave Resave, indexGC IndexGC, wg *pr2.WaitGroup, )
func TestSummary ¶
func TestSummary( t *testing.T, save SaveEntity, wg *pr2.WaitGroup, )
Types ¶
type BeingRefered ¶
func (*BeingRefered) Error ¶
func (e *BeingRefered) Error() string
type CheckRefOption ¶
type CheckRefOption interface {
IsCheckRefOption()
}
type CleanIndex ¶
type CleanIndex func( ctx context.Context, options ...CleanIndexOption, ) error
type CleanIndexOption ¶
type CleanIndexOption interface {
IsCleanIndexOption()
}
type DeadObject ¶
type Def ¶
type Def struct{}
func (Def) CleanIndex ¶
func (Def) CleanIndex( deleteIndex DeleteIndex, store store.Store, ) CleanIndex
func (Def) Delete ¶
func (Def) Delete( fetch Fetch, store Store, index Index, sel index.SelectIndex, deleteSummary DeleteSummary, ) Delete
func (Def) DeleteIndex ¶
func (Def) DeleteIndex( index Index, parallel sys.Parallel, ) DeleteIndex
func (Def) DeleteSummary ¶
func (_ Def) DeleteSummary( store store.Store, index Index, locks *_EntityLocks, onDel OnSummaryIndexDelete, ) DeleteSummary
func (Def) EntityLocks ¶
func (_ Def) EntityLocks() *_EntityLocks
func (Def) GC ¶
func (Def) GC( store Store, selIndex index.SelectIndex, index Index, parallel sys.Parallel, deleteSummary DeleteSummary, ) GC
func (Def) HashIndexSet ¶
func (_ Def) HashIndexSet( newHashState key.NewHashState, ) HashIndexSet
func (Def) IdxReferToFuncs ¶
func (Def) IdxReferToFuncs() ( add OnSummaryIndexAdd, del OnSummaryIndexDelete, )
func (Def) IdxReferedByFuncs ¶
func (_ Def) IdxReferedByFuncs() ( add OnSummaryIndexAdd, del OnSummaryIndexDelete, )
func (Def) IdxSummaryKeyFuncs ¶
func (Def) IdxSummaryKeyFuncs() ( add OnSummaryIndexAdd, del OnSummaryIndexDelete, )
func (Def) IdxSummaryOfFuncs ¶
func (Def) IdxSummaryOfFuncs() ( add OnSummaryIndexAdd, del OnSummaryIndexDelete, )
func (Def) IndexFuncs ¶
func (Def) IndexFuncs( store Store, saveSummary SaveSummary, sel index.SelectIndex, parallel sys.Parallel, ) (rebuild RebuildIndex, update UpdateIndex)
func (Def) Save ¶
func (Def) Save( store store.Store, scope dscope.Scope, newHashState key.NewHashState, saveSummary SaveSummary, ) ( save Save, )
func (Def) SaveEntity ¶
func (Def) SaveEntity( save Save, ) SaveEntity
func (Def) SaveSummary ¶
func (_ Def) SaveSummary( store store.Store, sel index.SelectIndex, fetch Fetch, index Index, locks *_EntityLocks, onAdd OnSummaryIndexAdd, onDel OnSummaryIndexDelete, ) SaveSummary
func (Def) SummaryIndexFuncs ¶
func (_ Def) SummaryIndexFuncs( sel index.SelectIndex, ) ( add OnSummaryIndexAdd, del OnSummaryIndexDelete, )
type DeleteIndex ¶
type DeleteIndex func( ctx context.Context, predict func(sb.Stream) (*IndexEntry, error), options ...DeleteIndexOption, ) error
type DeleteIndexOption ¶
type DeleteIndexOption interface {
IsDeleteIndexOption()
}
type DeleteSummary ¶
type HasSlotKeys ¶
type HasSlotKeys interface {
SlotKeys() (any, error)
}
type HashIndexSet ¶
type IgnoreSummary ¶
func (IgnoreSummary) IsPushOption ¶
func (IgnoreSummary) IsPushOption()
type IndexEntry ¶
type IndexGCOption ¶
type IndexGCOption interface {
IsIndexGCOption()
}
type IndexManager ¶
type IndexManager = index.IndexManager
type IndexOption ¶
type IndexOption interface {
IsIndexOption()
}
type IndexPreEntry ¶
type IndexSaveOption ¶
type IndexSaveOption = index.SaveOption
type IndexSet ¶
type IndexSet []IndexEntry
type IndexTapEntry ¶
type NewHashState ¶
type NewHashState = key.NewHashState
type OnSummaryIndexAdd ¶
type OnSummaryIndexDelete ¶
type Push ¶
type Push func( ctx context.Context, to Store, toIndex IndexManager, keys []Key, options ...PushOption, ) error
type PushOption ¶
type PushOption interface {
IsPushOption()
}
type RebuildIndex ¶
type RebuildIndex func( ctx context.Context, options ...IndexOption, ) ( n int64, err error, )
type ResaveOption ¶
type ResaveOption interface {
IsResaveOption()
}
type Save ¶
type Save func( ctx context.Context, ns key.Namespace, value any, options ...SaveOption, ) ( summary *Summary, err error, )
save entity
type SaveEntity ¶
type SaveEntity func( ctx context.Context, value any, options ...SaveOption, ) ( summary *Summary, err error, )
type SaveOption ¶
type SaveOption interface {
IsSaveOption()
}
type SaveOptions ¶
type SaveOptions []SaveOption
func (SaveOptions) IsResaveOption ¶
func (SaveOptions) IsResaveOption()
type SaveSummary ¶
type SaveSummary func( ctx context.Context, summary *Summary, isLatest bool, options ...SaveSummaryOption, ) error
SaveSummary
type SaveSummaryOption ¶
type SaveSummaryOption interface {
IsSaveSummaryOption()
}
type SaveSummaryOptions ¶
type SaveSummaryOptions []SaveSummaryOption
func (SaveSummaryOptions) IsSaveOption ¶
func (SaveSummaryOptions) IsSaveOption()
type Summary ¶
type Summary struct { Key Key SlotHash *Hash Indexes *[]IndexEntry // IndexEntry without Key in Tuple Subs []*Summary ReferedKeys []Key // all in NSEntity }
func (Summary) SBDeprecatedFields ¶
type TapBadSummary ¶
type TapBadSummary func(*Summary)
func (TapBadSummary) IsSyncOption ¶
func (TapBadSummary) IsSyncOption()
type TapDeadObjects ¶
type TapDeadObjects func([]DeadObject)
func (TapDeadObjects) IsGCOption ¶
func (TapDeadObjects) IsGCOption()
type TapDeleteIndex ¶
type TapDeleteIndex func(IndexEntry)
func (TapDeleteIndex) IsCleanIndexOption ¶
func (TapDeleteIndex) IsCleanIndexOption()
func (TapDeleteIndex) IsDeleteIndexOption ¶
func (TapDeleteIndex) IsDeleteIndexOption()
func (TapDeleteIndex) IsIndexGCOption ¶
func (TapDeleteIndex) IsIndexGCOption()
type TapIterKey ¶
type TapIterKey func(Key)
func (TapIterKey) IsGCOption ¶
func (TapIterKey) IsGCOption()
type TapMarkKey ¶
type TapMarkKey func(Key)
OnMark is called when key is marked, may call more than once for the same key
func (TapMarkKey) IsGCOption ¶
func (TapMarkKey) IsGCOption()
type TapPushCheckSummary ¶
type TapPushCheckSummary func(summaryKey Key)
func (TapPushCheckSummary) IsPushOption ¶
func (TapPushCheckSummary) IsPushOption()
type TapPushSave ¶
func (TapPushSave) IsPushOption ¶
func (TapPushSave) IsPushOption()
type TapReachableObjects ¶
func (TapReachableObjects) IsGCOption ¶
func (TapReachableObjects) IsGCOption()
type TapSummary ¶
type TapSummary func(*Summary)
func (TapSummary) IsSaveOption ¶
func (TapSummary) IsSaveOption()
func (TapSummary) IsSyncOption ¶
func (TapSummary) IsSyncOption()
type TapSweepDeadObject ¶
type TapSweepDeadObject func(DeadObject)
func (TapSweepDeadObject) IsGCOption ¶
func (TapSweepDeadObject) IsGCOption()
type TapWriteResult ¶
type TapWriteResult = store.TapWriteResult
type UpdateIndex ¶
type UpdateIndex func( ctx context.Context, options ...IndexOption, ) ( n int64, err error, )
type WithIndexSaveOptions ¶
type WithIndexSaveOptions []IndexSaveOption
func (WithIndexSaveOptions) IsIndexOption ¶
func (WithIndexSaveOptions) IsIndexOption()
func (WithIndexSaveOptions) IsSaveSummaryOption ¶
func (_ WithIndexSaveOptions) IsSaveSummaryOption()
type WriteOption ¶
type WriteOption = store.WriteOption
type WriteResult ¶
type WriteResult = store.WriteResult
Source Files ¶
- alias.go
- check_ref.go
- clean_index.go
- def.go
- delete.go
- delete_index.go
- fetch.go
- gc.go
- has_index.go
- idx_name.go
- idx_refer_to.go
- idx_refered_by.go
- idx_summary_key.go
- idx_summary_of.go
- idx_type.go
- idx_version.go
- index_gc.go
- index_set.go
- lock.go
- name.go
- namespace.go
- opts.go
- push.go
- rebuild_update_index.go
- resave.go
- save.go
- slot.go
- summary.go
- test_delete.go
- test_entity.go
- test_fetch.go
- test_gc.go
- test_index.go
- test_integrity.go
- test_lock.go
- test_name.go
- test_push.go
- test_summary.go
Click to show internal directories.
Click to hide internal directories.