consensus

package
v0.2202.6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package consensus implements publicly accessible consensus services.

Index

Constants

View Source
const (
	// CfgWorkerEnabled enables the consensus RPC services worker.
	CfgWorkerEnabled = "worker.consensusrpc.enabled"
)

Variables

Flags has the configuration flags.

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 providing publicly accessible consensus services.

Currently this only exposes the consensus light client service.

func New

func New(commonWorker *workerCommon.Worker, registration *registration.Worker) (*Worker, error)

New creates a new public consensus services worker.

func (*Worker) Cleanup

func (w *Worker) Cleanup()

Cleanup performs the service specific post-termination cleanup.

func (*Worker) Enabled

func (w *Worker) Enabled() bool

Enabled returns if worker is enabled.

func (*Worker) Name

func (w *Worker) Name() string

Name returns the service name.

func (*Worker) Quit

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

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

func (*Worker) Start

func (w *Worker) Start() error

Start starts the worker.

func (*Worker) Stop

func (w *Worker) Stop()

Stop halts the service.

Jump to

Keyboard shortcuts

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