Documentation ¶
Index ¶
- Constants
- type Config
- type Plugin
- func (s *Plugin) Close() error
- func (s *Plugin) Delete(keys ...string) error
- func (s *Plugin) Get(key string) ([]byte, error)
- func (s *Plugin) Has(keys ...string) (map[string]bool, error)
- func (s *Plugin) Init(log logger.Logger, cfg config.Configurer) error
- func (s *Plugin) MExpire(items ...kv.Item) error
- func (s *Plugin) MGet(keys ...string) (map[string]interface{}, error)
- func (s *Plugin) Name() string
- func (s *Plugin) RPC() interface{}
- func (s *Plugin) Serve() chan error
- func (s *Plugin) Set(items ...kv.Item) error
- func (s *Plugin) Stop() error
- func (s *Plugin) TTL(keys ...string) (map[string]interface{}, error)
Constants ¶
View Source
const PluginName = "boltdb"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Dir is a directory to store the DB files Dir string // 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 // Bucket to store data in boltDB Bucket string // db file permissions Permissions int // timeout Interval uint `mapstructure:"interval"` }
func (*Config) InitDefaults ¶
func (s *Config) InitDefaults()
InitDefaults initializes default values for the boltdb
type Plugin ¶
BoltDB K/V storage.
func (*Plugin) 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.