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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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