Documentation
¶
Index ¶
- Constants
- func New(_ context.Context, endpoints []string, options *Config) (store.Store, error)
- type Config
- type Store
- func (s *Store) AtomicDelete(ctx context.Context, key string, previous *store.KVPair) (bool, error)
- func (s *Store) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, ...) (bool, *store.KVPair, error)
- func (s *Store) Close() error
- func (s *Store) Delete(ctx context.Context, key string) error
- func (s *Store) DeleteTree(ctx context.Context, directory string) error
- func (s *Store) Exists(ctx context.Context, key string, _ *store.ReadOptions) (bool, error)
- func (s *Store) Get(ctx context.Context, key string, _ *store.ReadOptions) (pair *store.KVPair, err error)
- func (s *Store) List(ctx context.Context, directory string, opts *store.ReadOptions) ([]*store.KVPair, error)
- func (s *Store) NewLock(_ context.Context, key string, opts *store.LockOptions) (lock store.Locker, err error)
- func (s *Store) Put(ctx context.Context, key string, value []byte, opts *store.WriteOptions) error
- func (s *Store) Watch(ctx context.Context, key string, _ *store.ReadOptions) (<-chan *store.KVPair, error)
- func (s *Store) WatchTree(ctx context.Context, directory string, opts *store.ReadOptions) (<-chan []*store.KVPair, error)
Constants ¶
View Source
const StoreName = "natskv"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AtomicDelete ¶
func (*Store) AtomicPut ¶
func (s *Store) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut puts a value at "key" if the key has not been modified in the meantime, throws an error if this is the case.
Click to show internal directories.
Click to hide internal directories.