state

package
v0.44.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistentStorage

type PersistentStorage struct {
	// contains filtered or unexported fields
}

PersistentStorage is a wrapper around persistent K:V db that provides thread safe functions to set and fetch state variables of the Inner Ring and Storage applications.

func NewPersistentStorage

func NewPersistentStorage(path string) (*PersistentStorage, error)

NewPersistentStorage creates a new instance of a storage with 0600 rights.

func (PersistentStorage) Close

func (p PersistentStorage) Close() error

Close closes persistent database instance.

func (PersistentStorage) SetUInt32

func (p PersistentStorage) SetUInt32(key []byte, value uint32) error

SetUInt32 sets a uint32 value in the storage.

func (PersistentStorage) UInt32

func (p PersistentStorage) UInt32(key []byte) (n uint32, err error)

UInt32 returns a uint32 value from persistent storage. If the value does not exist, returns 0.

Jump to

Keyboard shortcuts

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