storage

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Path to the persistent storage directory on disk.
	Dir string
}

Config stores meta-info about keeping data on disk

type Storage

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

Storage is a disk persistent storage for the client.

func Initialize

func Initialize(config Config, encryptionPassword string) (Storage, error)

Initialize initializes a disk storage with `keystore` and `work` directories. The provided `encryptionPassword` will be used to encrypt the work persisted to the storage.

func (*Storage) InitializeKeyStorePersistence

func (s *Storage) InitializeKeyStorePersistence(dir string) (
	persistence.ProtectedHandle,
	error,
)

InitializeKeyStorePersistence initializes a disk persistence under keystore parent.

func (*Storage) InitializeWorkPersistence

func (s *Storage) InitializeWorkPersistence(dir string) (
	persistence.BasicHandle,
	error,
)

InitializeWorkPersistence initializes a disk persistence under work parent.

Jump to

Keyboard shortcuts

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