Documentation ¶
Index ¶
- func Supplier() (store streams.Store)
- type DB
- func (d *DB) Close() (err error)
- func (d *DB) Delete(key []byte) (err error)
- func (d *DB) Get(key []byte) (value []byte, err error)
- func (d *DB) Init(pc streams.ProcessorContext) (err error)
- func (d *DB) Name() (name string)
- func (d *DB) Process(pc streams.ProcessorContext, record streams.Record)
- func (d *DB) Range(from, to []byte, cb func(key, value []byte) error) (err error)
- func (d *DB) RangePrefix(prefix []byte, cb func(key, value []byte) error) (err error)
- func (d *DB) Remove() (err error)
- func (d *DB) Set(key, value []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a in-memory key value MOSS state store
func (*DB) Process ¶
func (d *DB) Process(pc streams.ProcessorContext, record streams.Record)
Process store or deletes any forwarded record to the store. Records with empty values deletes the given key from the store.
func (*DB) Range ¶
Range iterates the store within the given key range applying the callback for the key value pairs. Returning a error causes the iteration to stop. A nil from or to sets the iterator to the begining or end of Store. Setting both from and to as nil iterates the whole store
func (*DB) RangePrefix ¶
RangePrefix iterates the store over a key prefix applying the callback for the key value pairs. Returning a error causes the iteration to stop.
Click to show internal directories.
Click to hide internal directories.