Documentation ¶
Index ¶
- func NewEncodedKV(bucket nats.KeyValue, k KeyCodec, v ValueCodec) nats.KeyValue
- type EncodedKV
- func (e *EncodedKV) Bucket() string
- func (e *EncodedKV) Create(key string, value []byte) (revision uint64, err error)
- func (e *EncodedKV) Delete(key string, opts ...nats.DeleteOpt) error
- func (e *EncodedKV) Get(key string) (nats.KeyValueEntry, error)
- func (e *EncodedKV) GetRevision(key string, revision uint64) (nats.KeyValueEntry, error)
- func (e *EncodedKV) History(key string, opts ...nats.WatchOpt) ([]nats.KeyValueEntry, error)
- func (e *EncodedKV) Keys(opts ...nats.WatchOpt) ([]string, error)
- func (e *EncodedKV) Purge(key string, opts ...nats.DeleteOpt) error
- func (e *EncodedKV) PurgeDeletes(opts ...nats.PurgeOpt) error
- func (e *EncodedKV) Put(key string, value []byte) (revision uint64, err error)
- func (e *EncodedKV) PutString(key string, value string) (revision uint64, err error)
- func (e *EncodedKV) Status() (nats.KeyValueStatus, error)
- func (e *EncodedKV) Update(key string, value []byte, last uint64) (revision uint64, err error)
- func (e *EncodedKV) Watch(keys string, opts ...nats.WatchOpt) (nats.KeyWatcher, error)
- func (e *EncodedKV) WatchAll(opts ...nats.WatchOpt) (nats.KeyWatcher, error)
- type EtcdKeyCodec
- type KeyCodec
- type PlainCodec
- type S2ValueCodec
- type ValueCodec
- type WatcherWithCtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEncodedKV ¶
func NewEncodedKV(bucket nats.KeyValue, k KeyCodec, v ValueCodec) nats.KeyValue
Types ¶
type EncodedKV ¶
type EncodedKV struct { WatcherWithCtx // contains filtered or unexported fields }
func (*EncodedKV) GetRevision ¶
func (*EncodedKV) PurgeDeletes ¶
type EtcdKeyCodec ¶
type EtcdKeyCodec struct{}
EtcdKeyCodec turns keys like /this/is/a.test.key into Base58 encoded values split on `/` This is because NATS Jetstream Keys are split on . rather than /
func (*EtcdKeyCodec) EncodeRange ¶
func (e *EtcdKeyCodec) EncodeRange(keys string) (string, error)
type PlainCodec ¶
type PlainCodec struct{}
type S2ValueCodec ¶
type S2ValueCodec struct{}
type ValueCodec ¶
type WatcherWithCtx ¶
Click to show internal directories.
Click to hide internal directories.