Documentation ¶
Overview ¶
LRU + Watch
Index ¶
- type CacheEtcdStore
- func (s *CacheEtcdStore) Get(ctx context.Context, key string) (storetypes.KeyValue, error)
- func (s *CacheEtcdStore) PrefixGet(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
- func (s *CacheEtcdStore) PrefixGetKey(ctx context.Context, prefix string) ([]storetypes.Key, error)
- func (s *CacheEtcdStore) PrefixRemove(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
- func (s *CacheEtcdStore) Put(ctx context.Context, key, value string) error
- func (s *CacheEtcdStore) PutWithOption(ctx context.Context, key, value string, opts []interface{}) (interface{}, error)
- func (s *CacheEtcdStore) Remove(ctx context.Context, key string) (*storetypes.KeyValue, error)
- func (s *CacheEtcdStore) Watch(ctx context.Context, key string, isPrefix bool, filterDelete bool) (storetypes.WatchChan, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheEtcdStore ¶
func (*CacheEtcdStore) Get ¶
func (s *CacheEtcdStore) Get(ctx context.Context, key string) (storetypes.KeyValue, error)
func (*CacheEtcdStore) PrefixGet ¶
func (s *CacheEtcdStore) PrefixGet(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
直接从etcd prefixget, 因为 mem 中是 lru, 所以读 etcd 是必然的, 那么直接跳过 lru prefixget
func (*CacheEtcdStore) PrefixGetKey ¶
func (s *CacheEtcdStore) PrefixGetKey(ctx context.Context, prefix string) ([]storetypes.Key, error)
直接从etcd prefixgetkey, 因为 mem 中是 lru, 所以读 etcd 是必然的, 那么直接跳过 lru prefixgetkey
func (*CacheEtcdStore) PrefixRemove ¶
func (s *CacheEtcdStore) PrefixRemove(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)
func (*CacheEtcdStore) Put ¶
func (s *CacheEtcdStore) Put(ctx context.Context, key, value string) error
func (*CacheEtcdStore) PutWithOption ¶
func (s *CacheEtcdStore) PutWithOption(ctx context.Context, key, value string, opts []interface{}) (interface{}, error)
func (*CacheEtcdStore) Remove ¶
func (s *CacheEtcdStore) Remove(ctx context.Context, key string) (*storetypes.KeyValue, error)
Click to show internal directories.
Click to hide internal directories.