storage

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 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) Flush

func (s *Storage) Flush(eventID string)

Flush removes variables by their parent event ID.

func (*Storage) Get

func (s *Storage) Get(eventID string, key string) interface{}

Get reads value by a key.

func (*Storage) ListEventIDs

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

ListEventIDs returns the list of stored event IDs.

func (*Storage) ListEventVariables

func (s *Storage) ListEventVariables(eventID string) []string

ListEventVariables returns the slice of variables created for EventID.

func (*Storage) Set

func (s *Storage) Set(eventID, key string, value 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