state

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertUnique

func InsertUnique(ctx context.Context, sk *core.StateKey, value string) error

InsertUnique ... Inserts a new unique entry into the state store No error if the entry already exists, only warning NOTE: Loading state from context is a temporary solution

Types

type Store

type Store interface {
	GetSlice(context.Context, *core.StateKey) ([]string, error)

	SetSlice(context.Context, *core.StateKey, string) (string, error)
	Remove(context.Context, *core.StateKey) error
}

Store ... Interface for a state store TODO() - Add optional redis store implementation

func FromContext

func FromContext(ctx context.Context) (Store, error)

FromContext ... Fetches a state store from context

func NewMemState

func NewMemState() Store

NewMemState ... Initializer

Jump to

Keyboard shortcuts

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