state

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchState

func FetchState(ctx context.Context, storeConfigMap store.ConfigMap) (*storeSnapshotsMap, error)

Types

type FullStoreFile

type FullStoreFile = block.Range

type PartialStoreFiles

type PartialStoreFiles = block.Ranges

type Snapshot

type Snapshot struct {
	block.Range
	Path string
}

type StoreStorageState

type StoreStorageState struct {
	ModuleName         string
	ModuleInitialBlock uint64

	InitialCompleteRange *FullStoreFile // Points to a complete .kv file, to initialize the store upon getting started.
	PartialsMissing      PartialStoreFiles
	PartialsPresent      PartialStoreFiles
}

ModuleStorageState contains all the file-related ranges of store snapshots we'll want to plan work for, and things that are already available.

func NewStoreStorageState

func NewStoreStorageState(modName string, storeSaveInterval, modInitBlock, workUpToBlockNum uint64, snapshots *storeSnapshots) (out *StoreStorageState, err error)

func (*StoreStorageState) BatchRequests

func (s *StoreStorageState) BatchRequests(subreqSplitSize uint64) block.Ranges

func (*StoreStorageState) InitialProgressRanges

func (s *StoreStorageState) InitialProgressRanges() (out block.Ranges)

func (*StoreStorageState) MarshalLogObject

func (w *StoreStorageState) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*StoreStorageState) Name

func (s *StoreStorageState) Name() string

func (*StoreStorageState) ReadyUpToBlock

func (s *StoreStorageState) ReadyUpToBlock() uint64

Jump to

Keyboard shortcuts

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