memory

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package memory contains in-memory store implementation for neuron framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	Options *store.Options
	// contains filtered or unexported fields
}

Memory is a in-memory store implementation for neuron store.

func New

func New(options ...store.Option) *Memory

New creates new in-memory store.

func (Memory) Close

func (m Memory) Close(context.Context) error

Close implements io.Closer interface.

func (*Memory) Delete

func (m *Memory) Delete(ctx context.Context, key string) error

Delete implements store.Store interface.

func (*Memory) Find

func (m *Memory) Find(ctx context.Context, options ...store.FindOption) ([]*store.Record, error)

Find implements store.Store.

func (*Memory) Get

func (m *Memory) Get(ctx context.Context, key string) (*store.Record, error)

Get implements store.Store interface.

func (*Memory) Initialize

func (m *Memory) Initialize(c *controller.Controller) error

Initialize implements core.Initializer interface.

func (*Memory) Set

func (m *Memory) Set(ctx context.Context, record *store.Record) error

Set implements store.Store interface.

func (*Memory) SetWithTTL

func (m *Memory) SetWithTTL(ctx context.Context, record *store.Record, ttl time.Duration) error

SetWithTTL implements store.Store interface.

Jump to

Keyboard shortcuts

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