storage

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 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 added in v1.23.0

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 added in v1.23.0

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

ListEventIDs returns the list of stored event IDs.

func (*Storage) ListEventVariables added in v1.23.0

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