testhelper

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PersistenceHandleMock

type PersistenceHandleMock struct {
	PersistedGroups []*TestFileInfo
	Snapshots       []*TestFileInfo
	ArchivedGroups  []string
	// contains filtered or unexported fields
}

PersistenceHandleMock is a mock of persistence handle used in tests.

func NewPersistenceHandleMock

func NewPersistenceHandleMock(outputDataChanSize int) *PersistenceHandleMock

NewPersistenceHandleMock creates a mocked persistence handle.

func (*PersistenceHandleMock) Archive

func (phm *PersistenceHandleMock) Archive(directory string) error

Archive archives data in persistence handle.

func (*PersistenceHandleMock) MockSigner

func (phm *PersistenceHandleMock) MockSigner(membershipIndex int, keepID string, signer *tss.ThresholdSigner) error

MockSigner registers a mock of a signer for membership and keep.

func (*PersistenceHandleMock) ReadAll

func (phm *PersistenceHandleMock) ReadAll() (<-chan persistence.DataDescriptor, <-chan error)

ReadAll reads all data stored in persistence handle.

func (*PersistenceHandleMock) Save

func (phm *PersistenceHandleMock) Save(data []byte, directory string, name string) error

Save stores data in persistence handle.

func (*PersistenceHandleMock) Snapshot

func (phm *PersistenceHandleMock) Snapshot(data []byte, directory string, name string) error

Snapshot creates a snapshot of data in persistence handle.

type TestFileInfo

type TestFileInfo struct {
	Data      []byte
	Directory string
	Name      string
}

TestFileInfo holds test data stored in persistence handle.

Jump to

Keyboard shortcuts

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