local

package
v0.0.0-...-fa7c36c Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

Store is the struct for this store.Inner implementation

func Get

func Get(addr string) *Store

Get returns a Store

func (*Store) Get

func (p *Store) Get(key string) string

Get retrieves the value of a single key

func (*Store) Has

func (p *Store) Has(key string) bool

Has tests whether this Store contains a certain key

func (*Store) HasList

func (p *Store) HasList(key string) bool

HasList returns true if there is a list associated with this key

func (*Store) ListAdd

func (p *Store) ListAdd(key, value string)

ListAdd appends value to the list at key

func (*Store) ListGet

func (p *Store) ListGet(key string) []string

ListGet returns all items for the list at key

func (*Store) ListHas

func (p *Store) ListHas(key, value string) bool

ListHas returns true if the list at this key contains value

func (*Store) ListLen

func (p *Store) ListLen(key string) int

ListLen returns the number of items in the list at key

func (*Store) ListRemove

func (p *Store) ListRemove(key, value string)

ListRemove removes value from the list at key

func (*Store) Ping

func (p *Store) Ping() error

Ping ensures we have a valid connection to this store

func (*Store) Range

func (p *Store) Range(f func(key string, val string) bool)

Range loops over all values in this Store

func (*Store) Rem

func (p *Store) Rem(key string)

Rem removes a key from the store

func (*Store) Set

func (p *Store) Set(key string, val string)

Set sets the value of a single key

func (*Store) Type

func (p *Store) Type() string

Type returns the loader for this Store

Jump to

Keyboard shortcuts

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