Documentation ¶
Index ¶
- Variables
- func MakeInMemoryGroupStore(config map[string]interface{}, id []byte) (aggregate.GroupStore, error)
- type GroupStoreMaker
- type GroupsByTo
- type InMemoryGroup
- func (g *InMemoryGroup) Clone() (aggregate.Group, error)
- func (g *InMemoryGroup) Expiration() int64
- func (g *InMemoryGroup) GroupByValues() map[string]interface{}
- func (g *InMemoryGroup) Hash() []byte
- func (g *InMemoryGroup) Initialize(state aggregate.State) error
- func (g *InMemoryGroup) Initialized() bool
- func (g *InMemoryGroup) Lock()
- func (g *InMemoryGroup) RLock()
- func (g *InMemoryGroup) RUnlock()
- func (g *InMemoryGroup) State() aggregate.State
- func (g *InMemoryGroup) Unlock()
- type InMemoryGroupStore
- func (g *InMemoryGroupStore) ExpireAllGroups() (map[string][]aggregate.Group, error)
- func (g *InMemoryGroupStore) ExpireGroups(expiration int64) (map[string][]aggregate.Group, error)
- func (g *InMemoryGroupStore) Reset() error
- func (g *InMemoryGroupStore) Return(id int) error
- func (g *InMemoryGroupStore) Shard() (aggregate.Shard, error)
- func (g *InMemoryGroupStore) Teardown() error
- type InMemoryShard
- func (g *InMemoryShard) Commit() error
- func (g *InMemoryShard) CreateGroup(hash []byte, groupByFields map[string]interface{}, expiration int64) (aggregate.Group, error)
- func (g *InMemoryShard) ExpireAllGroups() ([]aggregate.Group, error)
- func (g *InMemoryShard) ExpireGroups(expiration int64) ([]aggregate.Group, error)
- func (g *InMemoryShard) GroupByHash(hash []byte) (aggregate.Group, error)
- func (g *InMemoryShard) ID() interface{}
- func (g *InMemoryShard) Return() error
- type MutexBTree
- type MutexConfigGroup
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupStores = map[string]GroupStoreMaker{ "in-memory": MakeInMemoryGroupStore, }
View Source
var Store map[string]*InMemoryGroupStore
Functions ¶
func MakeInMemoryGroupStore ¶
func MakeInMemoryGroupStore(config map[string]interface{}, id []byte) (aggregate.GroupStore, error)
Create a new InMemoryGroupStore object for the given config
Types ¶
type GroupStoreMaker ¶
type GroupStoreMaker func(map[string]interface{}, []byte) (aggregate.GroupStore, error)
type GroupsByTo ¶
type InMemoryGroup ¶
type InMemoryGroup struct {
// contains filtered or unexported fields
}
func MakeInMemoryGroup ¶
func MakeInMemoryGroup(hash []byte, groupByValues map[string]interface{}, expiration int64, shard *InMemoryShard) *InMemoryGroup
func (*InMemoryGroup) Expiration ¶
func (g *InMemoryGroup) Expiration() int64
Get the expiration value for the group
func (*InMemoryGroup) GroupByValues ¶
func (g *InMemoryGroup) GroupByValues() map[string]interface{}
Return the group-by fields of a given group
func (*InMemoryGroup) Initialize ¶
func (g *InMemoryGroup) Initialize(state aggregate.State) error
Initialize the group
func (*InMemoryGroup) Initialized ¶
func (g *InMemoryGroup) Initialized() bool
Returns whether a given group is initialized
func (*InMemoryGroup) Lock ¶
func (g *InMemoryGroup) Lock()
func (*InMemoryGroup) RLock ¶
func (g *InMemoryGroup) RLock()
func (*InMemoryGroup) RUnlock ¶
func (g *InMemoryGroup) RUnlock()
func (*InMemoryGroup) State ¶
func (g *InMemoryGroup) State() aggregate.State
Return the state of the group
func (*InMemoryGroup) Unlock ¶
func (g *InMemoryGroup) Unlock()
type InMemoryGroupStore ¶
type InMemoryGroupStore struct {
// contains filtered or unexported fields
}
func (*InMemoryGroupStore) ExpireAllGroups ¶
func (g *InMemoryGroupStore) ExpireAllGroups() (map[string][]aggregate.Group, error)
func (*InMemoryGroupStore) ExpireGroups ¶
func (*InMemoryGroupStore) Return ¶
func (g *InMemoryGroupStore) Return(id int) error
func (*InMemoryGroupStore) Teardown ¶
func (g *InMemoryGroupStore) Teardown() error
type InMemoryShard ¶
type InMemoryShard struct {
// contains filtered or unexported fields
}
func MakeInMemoryShard ¶
func MakeInMemoryShard(id int, store *InMemoryGroupStore) *InMemoryShard
Create a new InMemoryShard object
func (*InMemoryShard) Commit ¶
func (g *InMemoryShard) Commit() error
Commit the state of the shard to the store
func (*InMemoryShard) CreateGroup ¶
func (g *InMemoryShard) CreateGroup(hash []byte, groupByFields map[string]interface{}, expiration int64) (aggregate.Group, error)
Return a group based on its hash.
func (*InMemoryShard) ExpireAllGroups ¶
func (g *InMemoryShard) ExpireAllGroups() ([]aggregate.Group, error)
func (*InMemoryShard) ExpireGroups ¶
func (g *InMemoryShard) ExpireGroups(expiration int64) ([]aggregate.Group, error)
Get all expired groups for a given config hash and time in the shard
func (*InMemoryShard) GroupByHash ¶
func (g *InMemoryShard) GroupByHash(hash []byte) (aggregate.Group, error)
Return a group based on its hash
func (*InMemoryShard) ID ¶
func (g *InMemoryShard) ID() interface{}
Click to show internal directories.
Click to hide internal directories.