Documentation ¶
Index ¶
- Constants
- type ItemList
- func (nl *ItemList) DeleteName(name string) error
- func (nl *ItemList) HasChanges() bool
- func (nl *ItemList) ItemAdd(lookupKey []byte, idIfKnown int64, names ...string) error
- func (nl *ItemList) ListNames(startFrom string, visitNamesFn func(name string) bool) error
- func (nl *ItemList) NodeAddMember(node *skiplist.SkipListElementReference, names ...string) error
- func (nl *ItemList) NodeContainsItem(node *skiplist.SkipListElementReference, item string) bool
- func (nl *ItemList) NodeDelete(node *skiplist.SkipListElementReference) error
- func (nl *ItemList) NodeDeleteAfterExclusive(node *skiplist.SkipListElementReference, startFrom string) error
- func (nl *ItemList) NodeDeleteBeforeExclusive(node *skiplist.SkipListElementReference, stopAt string) error
- func (nl *ItemList) NodeDeleteMember(node *skiplist.SkipListElementReference, name string) error
- func (nl *ItemList) NodeInnerPosition(node *skiplist.SkipListElementReference, name string) int
- func (nl *ItemList) NodeMin(node *skiplist.SkipListElementReference) string
- func (nl *ItemList) NodeRangeAfterExclusive(node *skiplist.SkipListElementReference, startFrom string) ([]string, error)
- func (nl *ItemList) NodeRangeBeforeExclusive(node *skiplist.SkipListElementReference, stopAt string) ([]string, error)
- func (nl *ItemList) NodeScanInclusiveAfter(node *skiplist.SkipListElementReference, startFrom string, ...) bool
- func (nl *ItemList) NodeSize(node *skiplist.SkipListElementReference) int
- func (nl *ItemList) RemoteAllListElement() error
- func (nl *ItemList) ToBytes() []byte
- func (nl *ItemList) WriteName(name string) error
- type Redis3SentinelStore
- type Redis3Store
- type RedisCluster3Store
- type SkipListElementStore
- type UniversalRedis3Store
- func (store *UniversalRedis3Store) BeginTransaction(ctx context.Context) (context.Context, error)
- func (store *UniversalRedis3Store) CommitTransaction(ctx context.Context) error
- func (store *UniversalRedis3Store) DeleteEntry(ctx context.Context, fullpath util.FullPath) (err error)
- func (store *UniversalRedis3Store) DeleteFolderChildren(ctx context.Context, fullpath util.FullPath) (err error)
- func (store *UniversalRedis3Store) FindEntry(ctx context.Context, fullpath util.FullPath) (entry *filer.Entry, err error)
- func (store *UniversalRedis3Store) InsertEntry(ctx context.Context, entry *filer.Entry) (err error)
- func (store *UniversalRedis3Store) KvDelete(ctx context.Context, key []byte) (err error)
- func (store *UniversalRedis3Store) KvGet(ctx context.Context, key []byte) (value []byte, err error)
- func (store *UniversalRedis3Store) KvPut(ctx context.Context, key []byte, value []byte) (err error)
- func (store *UniversalRedis3Store) ListDirectoryEntries(ctx context.Context, dirPath util.FullPath, startFileName string, ...) (lastFileName string, err error)
- func (store *UniversalRedis3Store) ListDirectoryPrefixedEntries(ctx context.Context, dirPath util.FullPath, startFileName string, ...) (lastFileName string, err error)
- func (store *UniversalRedis3Store) RollbackTransaction(ctx context.Context) error
- func (store *UniversalRedis3Store) Shutdown()
- func (store *UniversalRedis3Store) UpdateEntry(ctx context.Context, entry *filer.Entry) (err error)
Constants ¶
View Source
const (
DIR_LIST_MARKER = "\x00"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemList ¶
type ItemList struct {
// contains filtered or unexported fields
}
func LoadItemList ¶
func (*ItemList) DeleteName ¶
// case 1: exists in nextNode
if nextNode != nil && nextNode.Key == name { remove from nextNode, update nextNode // TODO: merge with prevNode if possible? return }
if nextNode is nil
prevNode = list.Largestnode
if prevNode == nil and nextNode.Prev != nil
prevNode = load(nextNode.Prev)
// case 2: does not exist // case 2.1
if prevNode == nil { return }
// case 2.2
if prevNameBatch does not contain name { return }
// case 3 delete from prevNameBatch if prevNameBatch + nextNode < capacityList
// case 3.1 merge
else
// case 3.2 update prevNode
func (*ItemList) HasChanges ¶
func (*ItemList) NodeAddMember ¶
func (nl *ItemList) NodeAddMember(node *skiplist.SkipListElementReference, names ...string) error
func (*ItemList) NodeContainsItem ¶
func (nl *ItemList) NodeContainsItem(node *skiplist.SkipListElementReference, item string) bool
func (*ItemList) NodeDelete ¶
func (nl *ItemList) NodeDelete(node *skiplist.SkipListElementReference) error
func (*ItemList) NodeDeleteAfterExclusive ¶
func (nl *ItemList) NodeDeleteAfterExclusive(node *skiplist.SkipListElementReference, startFrom string) error
func (*ItemList) NodeDeleteBeforeExclusive ¶
func (nl *ItemList) NodeDeleteBeforeExclusive(node *skiplist.SkipListElementReference, stopAt string) error
func (*ItemList) NodeDeleteMember ¶
func (nl *ItemList) NodeDeleteMember(node *skiplist.SkipListElementReference, name string) error
func (*ItemList) NodeInnerPosition ¶
func (nl *ItemList) NodeInnerPosition(node *skiplist.SkipListElementReference, name string) int
func (*ItemList) NodeMin ¶
func (nl *ItemList) NodeMin(node *skiplist.SkipListElementReference) string
func (*ItemList) NodeRangeAfterExclusive ¶
func (*ItemList) NodeRangeBeforeExclusive ¶
func (*ItemList) NodeScanInclusiveAfter ¶
func (*ItemList) NodeSize ¶
func (nl *ItemList) NodeSize(node *skiplist.SkipListElementReference) int
func (*ItemList) RemoteAllListElement ¶
type Redis3SentinelStore ¶
type Redis3SentinelStore struct {
UniversalRedis3Store
}
func (*Redis3SentinelStore) GetName ¶
func (store *Redis3SentinelStore) GetName() string
func (*Redis3SentinelStore) Initialize ¶
func (store *Redis3SentinelStore) Initialize(configuration util.Configuration, prefix string) (err error)
type Redis3Store ¶
type Redis3Store struct {
UniversalRedis3Store
}
func (*Redis3Store) GetName ¶
func (store *Redis3Store) GetName() string
func (*Redis3Store) Initialize ¶
func (store *Redis3Store) Initialize(configuration util.Configuration, prefix string) (err error)
type RedisCluster3Store ¶
type RedisCluster3Store struct {
UniversalRedis3Store
}
func (*RedisCluster3Store) GetName ¶
func (store *RedisCluster3Store) GetName() string
func (*RedisCluster3Store) Initialize ¶
func (store *RedisCluster3Store) Initialize(configuration util.Configuration, prefix string) (err error)
type SkipListElementStore ¶
type SkipListElementStore struct { Prefix string // contains filtered or unexported fields }
func (*SkipListElementStore) DeleteElement ¶
func (m *SkipListElementStore) DeleteElement(id int64) error
func (*SkipListElementStore) LoadElement ¶
func (m *SkipListElementStore) LoadElement(id int64) (*skiplist.SkipListElement, error)
func (*SkipListElementStore) SaveElement ¶
func (m *SkipListElementStore) SaveElement(id int64, element *skiplist.SkipListElement) error
type UniversalRedis3Store ¶
type UniversalRedis3Store struct { Client redis.UniversalClient // contains filtered or unexported fields }
func (*UniversalRedis3Store) BeginTransaction ¶
func (*UniversalRedis3Store) CommitTransaction ¶
func (store *UniversalRedis3Store) CommitTransaction(ctx context.Context) error
func (*UniversalRedis3Store) DeleteEntry ¶
func (*UniversalRedis3Store) DeleteFolderChildren ¶
func (*UniversalRedis3Store) InsertEntry ¶
func (*UniversalRedis3Store) KvDelete ¶
func (store *UniversalRedis3Store) KvDelete(ctx context.Context, key []byte) (err error)
func (*UniversalRedis3Store) ListDirectoryEntries ¶
func (*UniversalRedis3Store) ListDirectoryPrefixedEntries ¶
func (*UniversalRedis3Store) RollbackTransaction ¶
func (store *UniversalRedis3Store) RollbackTransaction(ctx context.Context) error
func (*UniversalRedis3Store) Shutdown ¶
func (store *UniversalRedis3Store) Shutdown()
func (*UniversalRedis3Store) UpdateEntry ¶
Click to show internal directories.
Click to hide internal directories.