Documentation ¶
Index ¶
- Constants
- func NewBoltDBDriver(log logger.Logger, key string, cfgPlugin config.Configurer, stop chan struct{}) (kv.Storage, error)
- type Config
- type Driver
- func (d *Driver) Delete(keys ...string) error
- func (d *Driver) Get(key string) ([]byte, error)
- func (d *Driver) Has(keys ...string) (map[string]bool, error)
- func (d *Driver) MExpire(items ...*kvv1.Item) error
- func (d *Driver) MGet(keys ...string) (map[string][]byte, error)
- func (d *Driver) Set(items ...*kvv1.Item) error
- func (d *Driver) TTL(keys ...string) (map[string]string, error)
- type Plugin
Constants ¶
View Source
const PluginName = "boltdb"
Variables ¶
This section is empty.
Functions ¶
func NewBoltDBDriver ¶
Types ¶
type Config ¶
type Config struct { // File is boltDB file. No need to create it by your own, // boltdb driver is able to create the file, or read existing File string // db file permissions Permissions int // timeout Interval int `mapstructure:"interval"` // contains filtered or unexported fields }
func (*Config) InitDefaults ¶
func (s *Config) InitDefaults()
InitDefaults initializes default values for the boltdb
type Driver ¶
func (*Driver) Get ¶
Get retrieves the value for a key in the bucket. Returns a nil value if the key does not exist or if the key is a nested bucket. The returned value is only valid for the life of the transaction.
Click to show internal directories.
Click to hide internal directories.