Documentation
¶
Index ¶
- type Bucket
- func (b *Bucket) Delete(field selectors.Field, value selectors.ValueScore) (selectors.ChangeSet, error)
- func (b *Bucket) Insert(field selectors.Field, value selectors.ValueScore) (selectors.ChangeSet, error)
- func (b *Bucket) Len() (int64, error)
- func (b *Bucket) Members() ([]selectors.Field, error)
- func (b *Bucket) Score(field selectors.Field) (selectors.Presence, error)
- func (b *Bucket) Select(field selectors.Field) (selectors.FieldValueScore, error)
- type Store
- type StoreContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket conforms to the Key/Val store interface and provides locking mechanism for each bucket.
func (*Bucket) Delete ¶
func (b *Bucket) Delete(field selectors.Field, value selectors.ValueScore) (selectors.ChangeSet, error)
Delete removes a member associated with a field and a store
func (*Bucket) Insert ¶
func (b *Bucket) Insert(field selectors.Field, value selectors.ValueScore) (selectors.ChangeSet, error)
Insert inserts a member associated with a field and a store
type Store ¶
type Store interface {
StoreContext
// Insert takes a key and value and stores with in the underlying store.
// Returns ChangeSet of success and failure
Insert(selectors.Key, []selectors.FieldValueScore) (selectors.ChangeSet, error)
// Delete removes a value associated with the key.
// Returns ChangeSet of success and failure
Delete(selectors.Key, []selectors.FieldValueScore) (selectors.ChangeSet, error)
// Select retrieves a field and score associated with the store.
// Returns Field, Value and Score if the value found
Select(selectors.Key, selectors.Field) (selectors.FieldValueScore, error)
// Keys returns all the potential keys that are stored with in the store.
Keys() ([]selectors.Key, error)
// Size returns the number of members for the key are stored in the store.
Size(selectors.Key) (int64, error)
// Members returns the members associated for a key
Members(selectors.Key) ([]selectors.Field, error)
// Score returns the specific score for the field with in the key.
Score(selectors.Key, selectors.Field) (selectors.Presence, error)
}
Store represents a in-memory Key/Value implementation
type StoreContext ¶
type StoreContext interface {
String() string
}
StoreContext holds the base of the store
Click to show internal directories.
Click to hide internal directories.