Documentation
¶
Index ¶
- Constants
- Variables
- func NewCoordinatorAccessor(co *Coordinator) *coordinatorAccessor
- type Coordinator
- func (co *Coordinator) Delete(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
- func (co *Coordinator) Insert(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
- func (co *Coordinator) Keys() (res []bs.Key, err error)
- func (co *Coordinator) Lock(ns b.Namespace) (b.SemaphoreUnlock, error)
- func (co *Coordinator) Members(key bs.Key) (res []bs.Key, err error)
- func (co *Coordinator) Modify(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
- func (co *Coordinator) ModifyWithOperations(key, id bs.Key, ops []s.Operation, score float64, maxSize s.SizeExpiry) (res int, err error)
- func (co *Coordinator) Pause()
- func (co *Coordinator) Query(key bs.Key, options s.QueryOptions, maxSize s.SizeExpiry) (res []s.QueryRecord, err error)
- func (co *Coordinator) Quit()
- func (co *Coordinator) Repair(elements []s.KeyFieldTxnValue, maxSize s.KeySizeExpiry) (err error)
- func (co *Coordinator) Resume()
- func (co *Coordinator) Rollback(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (err error)
- func (co *Coordinator) Select(key, field bs.Key) (res s.KeyFieldScoreTxnValue, err error)
- func (co *Coordinator) SelectRange(key bs.Key, limit int, maxSize s.KeySizeExpiry) (res []s.KeyFieldScoreTxnValue, err error)
- func (co *Coordinator) Size(key bs.Key) (res int, err error)
- func (co *Coordinator) Topology(e *env.Env) error
- type LifeCycleService
- type Requester
Constants ¶
const ( Match selectors.Op = "match" Replace selectors.Op = "replace" )
Match and Replace define possible operations for patching queries
Variables ¶
var ( ErrPartialInsertionFailure = typex.Errorf(errors.Source, errors.Partial, "Partial Insertion Failure") ErrPartialDeletionFailure = typex.Errorf(errors.Source, errors.Partial, "Partial Deletion Failure") ErrPartialRollbackFailure = typex.Errorf(errors.Source, errors.Partial, "Partial Rollback Failure") )
Functions ¶
func NewCoordinatorAccessor ¶
func NewCoordinatorAccessor(co *Coordinator) *coordinatorAccessor
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator defines a single point for accessing the data store.
func New ¶
func New(e *env.Env, transformer s.Transformer, accessor s.Accessor) *Coordinator
New defines a way to create a new Coordinator. It knits all the farms together to make sure the Coordinator can work, if something is missing the Coordinator will log out the error then exit.
func (*Coordinator) Delete ¶
func (co *Coordinator) Delete(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
Delete represents a way to delete various values into the store.
func (*Coordinator) Insert ¶
func (co *Coordinator) Insert(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
Insert represents a way to insert various values into the store.
func (*Coordinator) Keys ¶
func (co *Coordinator) Keys() (res []bs.Key, err error)
Keys defines a way to query the store for all the keys with in it.
func (*Coordinator) Lock ¶
func (co *Coordinator) Lock(ns b.Namespace) (b.SemaphoreUnlock, error)
func (*Coordinator) Members ¶
Members represents all the items with in the store for a particular key.
func (*Coordinator) Modify ¶
func (co *Coordinator) Modify(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (res int, err error)
Modify represents a way to modify various values into the store.
func (*Coordinator) ModifyWithOperations ¶
func (co *Coordinator) ModifyWithOperations(key, id bs.Key, ops []s.Operation, score float64, maxSize s.SizeExpiry) (res int, err error)
ModifyWithOperations represents a way to modify various values into the store.
func (*Coordinator) Query ¶
func (co *Coordinator) Query(key bs.Key, options s.QueryOptions, maxSize s.SizeExpiry, ) (res []s.QueryRecord, err error)
Query defines a way to request a possible query of the store of a particular key.
func (*Coordinator) Quit ¶
func (co *Coordinator) Quit()
func (*Coordinator) Repair ¶
func (co *Coordinator) Repair(elements []s.KeyFieldTxnValue, maxSize s.KeySizeExpiry) (err error)
Repair defines a way to request a possible repair of the store of a particular key.
func (*Coordinator) Rollback ¶
func (co *Coordinator) Rollback(values []s.KeyFieldScoreTxnValue, maxSize s.KeySizeExpiry) (err error)
Rollback represents a way to rollback various values into the store.
func (*Coordinator) Select ¶
func (co *Coordinator) Select(key, field bs.Key) (res s.KeyFieldScoreTxnValue, err error)
Select represents a way to request and select a member from the store.
func (*Coordinator) SelectRange ¶
func (co *Coordinator) SelectRange(key bs.Key, limit int, maxSize s.KeySizeExpiry) (res []s.KeyFieldScoreTxnValue, err error)
SelectRange represents a way to request and select a range of members from the store that are under a certain limit.
type LifeCycleService ¶
type LifeCycleService struct {
// contains filtered or unexported fields
}
LifeCycleService is aims to manage the basic shutdown of a service. With the idea that it knows about how many users are currently active with in it.
func (*LifeCycleService) Empty ¶
func (c *LifeCycleService) Empty() bool
func (*LifeCycleService) In ¶
func (c *LifeCycleService) In()
func (*LifeCycleService) Out ¶
func (c *LifeCycleService) Out()
func (*LifeCycleService) Quit ¶
func (c *LifeCycleService) Quit() (err error)