statemanager

package
v0.0.0-...-99cd499 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 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 StateManager

type StateManager struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

StateManager defines a provides a structure for storing global state of resources within the cluster it uses the sync.Mutex library, to providing locking

func GetStateManager

func GetStateManager() *StateManager

GetStateManager returns an instance of the state manager

func (*StateManager) Clear

func (sm *StateManager) Clear()

Clear resets the state manager

func (*StateManager) Get

func (sm *StateManager) Get(key string) interface{}

Get looks up the state manager for existing value

func (*StateManager) Set

func (sm *StateManager) Set(key string, value interface{})

Set creates a new value in the state manager

Jump to

Keyboard shortcuts

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