Documentation ¶
Index ¶
- type PersistentStorage
- func (p PersistentStorage) Bytes(key []byte) (res []byte, err error)
- func (p PersistentStorage) Close() error
- func (p PersistentStorage) SetBytes(key []byte, value []byte) error
- func (p PersistentStorage) SetUInt32(key []byte, value uint32) error
- func (p PersistentStorage) UInt32(key []byte) (n uint32, err error)
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 0o600 rights.
func (PersistentStorage) Bytes ¶ added in v0.39.0
func (p PersistentStorage) Bytes(key []byte) (res []byte, err error)
Bytes reads binary value by specified key. Returns nil if value is missing.
func (PersistentStorage) Close ¶
func (p PersistentStorage) Close() error
Close closes persistent database instance.
func (PersistentStorage) SetBytes ¶ added in v0.39.0
func (p PersistentStorage) SetBytes(key []byte, value []byte) error
SetBytes saves binary value in the storage by specified key.
Click to show internal directories.
Click to hide internal directories.