storage

package
v0.2011.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CfgWorkerEnabled enables the storage worker.
	CfgWorkerEnabled = "worker.storage.enabled"

	// CfgWorkerCheckpointCheckInterval configures the checkpointer check interval.
	CfgWorkerCheckpointCheckInterval = "worker.storage.checkpointer.check_interval"

	// CfgCheckpointSyncDisabled disables syncing from checkpoints on worker startup.
	CfgWorkerCheckpointSyncDisabled = "worker.storage.checkpoint_sync.disabled"

	// CfgWorkerDebugIgnoreApply is a debug option that makes the worker ignore
	// all apply operations.
	CfgWorkerDebugIgnoreApply = "worker.debug.storage.ignore_apply"
)

Variables

View Source
var (

	// Flags has the configuration flags.
	Flags = flag.NewFlagSet("", flag.ContinueOnError)
)

Functions

func Enabled

func Enabled() bool

Enabled reads our enabled flag from viper.

Types

type Worker

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

Worker is a worker handling storage operations.

func New

func New(
	grpcInternal *grpc.Server,
	commonWorker *workerCommon.Worker,
	registration *registration.Worker,
	genesis genesis.Provider,
	commonStore *persistent.CommonStore,
) (*Worker, error)

New constructs a new storage worker.

func (*Worker) Cleanup

func (s *Worker) Cleanup()

Cleanup performs the service specific post-termination cleanup.

func (*Worker) Enabled

func (s *Worker) Enabled() bool

Enabled returns if worker is enabled.

func (*Worker) ForceFinalize

func (w *Worker) ForceFinalize(ctx context.Context, request *api.ForceFinalizeRequest) error

func (*Worker) GetLastSyncedRound

func (w *Worker) GetLastSyncedRound(ctx context.Context, request *api.GetLastSyncedRoundRequest) (*api.GetLastSyncedRoundResponse, error)

func (*Worker) GetRuntime added in v0.2010.0

func (s *Worker) GetRuntime(id common.Namespace) *committee.Node

GetRuntime returns a storage committee node for the given runtime (if available).

In case the runtime with the specified id was not configured for this node it returns nil.

func (*Worker) Initialized

func (s *Worker) Initialized() <-chan struct{}

Initialized returns a channel that will be closed when the storage worker is initialized and ready to service requests.

func (*Worker) Name

func (s *Worker) Name() string

Name returns the service name.

func (*Worker) Quit

func (s *Worker) Quit() <-chan struct{}

Quit returns a channel that will be closed when the service terminates.

func (*Worker) Start

func (s *Worker) Start() error

Start starts the storage service.

func (*Worker) Stop

func (s *Worker) Stop()

Stop halts the service.

Directories

Path Synopsis
Package tests is a collection of storage worker test cases.
Package tests is a collection of storage worker test cases.

Jump to

Keyboard shortcuts

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