state

package
v0.27.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 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 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 uint32 value in the storage.

func (PersistentStorage) UInt32

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

UInt32 returns uint32 value from persistent storage. If value is not exists, returns 0.

Jump to

Keyboard shortcuts

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