storage

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a simple object that provides thread safe methods to read and write into a map.

func New

func New() *Storage

New returns an instance of Storage.

func (*Storage) Get

func (s *Storage) Get(k string) interface{}

Get reads value by a key.

func (*Storage) ListKeys

func (s *Storage) ListKeys() []string

ListKeys returns the slice of var keys stored in memory.

func (*Storage) Set

func (s *Storage) Set(k string, v interface{})

Set writes a value interface to a string key.

Jump to

Keyboard shortcuts

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