memory

package
v0.1.140 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config map[string]interface{}) (interface{}, error)

Memory Client component, configuration: components:

memory:
    gcInterval: "60s"
    gcMaxItems: 1000

Types

type Client

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

func (*Client) Add

func (c *Client) Add(key string, value interface{}, expires ...time.Duration) bool

func (*Client) Del

func (c *Client) Del(key string) bool

func (*Client) Exists

func (c *Client) Exists(key string) bool

func (*Client) Get

func (c *Client) Get(key string) *value.Value

func (*Client) Incr

func (c *Client) Incr(key string, delta int) int

func (*Client) Init

func (c *Client) Init() error

func (*Client) MAdd

func (c *Client) MAdd(items map[string]interface{}, expires ...time.Duration) bool

func (*Client) MDel

func (c *Client) MDel(keys []string) bool

func (*Client) MGet

func (c *Client) MGet(keys []string) map[string]*value.Value

func (*Client) MSet

func (c *Client) MSet(items map[string]interface{}, expires ...time.Duration) bool

func (*Client) Set

func (c *Client) Set(key string, value interface{}, expires ...time.Duration) bool

func (*Client) SetGcInterval

func (c *Client) SetGcInterval(v string) error

func (*Client) SetGcMaxItems

func (c *Client) SetGcMaxItems(gcMaxItems int)

func (*Client) SetLogger added in v0.1.7

func (c *Client) SetLogger(logger logs.ILogger)

Jump to

Keyboard shortcuts

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