Documentation
¶
Index ¶
- Constants
- func NewStores(cfg *config.DatastoreList, gmetrics *gmetric.Service) (map[string]*Service, error)
- type CacheStatus
- type Entry
- type EntryData
- type Key
- type Service
- func (s *Service) Config() *config.Datastore
- func (s *Service) Enabled() bool
- func (s *Service) GetInto(ctx context.Context, key *Key, storable Value) (dictHash int, err error)
- func (s *Service) Key(key string) *Key
- func (s *Service) Mode() StoreMode
- func (s *Service) Put(ctx context.Context, key *Key, value Value, dictHash int) error
- func (s *Service) SetMode(mode StoreMode)
- type StoreMode
- type Storer
- type Value
Constants ¶
View Source
const ( //CacheStatusFoundNoSuchKey cacheable no such key status CacheStatusFoundNoSuchKey = CacheStatus(iota) //CacheStatusNotFound no such key status CacheStatusNotFound //CacheStatusFound entry found status CacheStatusFound )
View Source
const ( //ModeServer server mode ModeServer = StoreMode(0) //ModeClient client mode ModeClient = StoreMode(1) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheStatus ¶
type CacheStatus int
type Entry ¶
Entry represents data entry
func (*Entry) DecodeBinary ¶
DecodeBinary decodes data to binary stream
type Key ¶
type Key struct { Namespace string Set string Value interface{} *aero.GenerationPolicy TimeToLive time.Duration L2 *Key }
Key represents a datastore key
func (*Key) WritePolicy ¶
func (k *Key) WritePolicy(generation uint32) *aero.WritePolicy
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service datastore service
func NewWithCache ¶
func NewWithCache(config *config.Datastore, l1Client, l2Client client.Service, counter *gmetric.Operation) (*Service, error)
NewWithCache creates Service with cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.