iface

package
v0.0.12-delta Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	io.Closer
	ReadOnlyDatabase

	SaveConsensusInfo(ctx context.Context, consensusInfo *eventTypes.MinimalEpochConsensusInfo) error
	SaveLatestEpoch(ctx context.Context) error

	DatabasePath() string
	ClearDB() error
}

Database interface with full access.

type ReadOnlyDatabase

type ReadOnlyDatabase interface {
	ConsensusInfo(ctx context.Context, epoch uint64) (*eventTypes.MinimalEpochConsensusInfo, error)
	ConsensusInfos(fromEpoch uint64) ([]*eventTypes.MinimalEpochConsensusInfo, error)
	LatestSavedEpoch() (uint64, error)
}

ReadOnlyDatabase defines a struct which only has read access to database methods.

Jump to

Keyboard shortcuts

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