Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyFinalized = errors.MakeExternalError("group has already been finalized", "GROUP-STORE", nil, nil)
View Source
var AlreadyInitialized = errors.MakeExternalError("group has already been initialized", "GROUP-STORE", nil, nil)
View Source
var NotFound = errors.MakeExternalError("group not found", "GROUP-STORE", nil, nil)
Functions ¶
This section is empty.
Types ¶
type GroupStore ¶
type GroupStore interface { // Tear down the group store Teardown() error // Reset the entire state of the group store Reset() error // Get a shard from the store Shard() (Shard, error) // Expire groups in all shards based on an expiration index ExpireGroups(expiration int64) (map[string][]Group, error) // Expire all groups in all shards ExpireAllGroups() (map[string][]Group, error) }
type Shard ¶
type Shard interface { // A unique ID identifying the shard globally ID() interface{} // Synchronize the shard state with the backend Commit() error // Return the shard to the group store so that it can be reused Return() error // Create a group in the shard CreateGroup(hash []byte, groupByValues map[string]interface{}, expiration int64) (Group, error) // Return a group by its unique hash value GroupByHash(hash []byte) (Group, error) // Expire groups in the shard based on an expiration index ExpireGroups(expiration int64) ([]Group, error) // Expire all groups in the shard ExpireAllGroups() ([]Group, error) }
Click to show internal directories.
Click to hide internal directories.