memory

package
v2.0.2-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "memory"

PluginName is user friendly name for the plugin

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Interval for the check
	Interval int
}

Config is default config for the in-memory driver

func (*Config) InitDefaults

func (c *Config) InitDefaults()

InitDefaults by default driver is turned off

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Close

func (s *Plugin) Close() error

Close clears the in-memory storage

func (*Plugin) Delete

func (s *Plugin) Delete(keys ...string) error

func (*Plugin) Get

func (s *Plugin) Get(key string) ([]byte, error)

func (*Plugin) Has

func (s *Plugin) Has(keys ...string) (map[string]bool, error)

func (*Plugin) Init

func (s *Plugin) Init(cfg config.Configurer, log logger.Logger) error

func (*Plugin) MExpire

func (s *Plugin) MExpire(items ...kv.Item) error

MExpire sets the expiration time to the key If key already has the expiration time, it will be overwritten

func (*Plugin) MGet

func (s *Plugin) MGet(keys ...string) (map[string]interface{}, error)

func (*Plugin) Name

func (s *Plugin) Name() string

Name returns plugin user-friendly name

func (*Plugin) RPC

func (s *Plugin) RPC() interface{}

RPCService returns associated rpc service.

func (*Plugin) Serve

func (s *Plugin) Serve() chan error

func (*Plugin) Set

func (s *Plugin) Set(items ...kv.Item) error

func (*Plugin) Stop

func (s *Plugin) Stop() error

func (*Plugin) TTL

func (s *Plugin) TTL(keys ...string) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL