duties

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerOptions

type ControllerOptions struct {
	Logger              *zap.Logger
	Ctx                 context.Context
	BeaconClient        beaconprotocol.Beacon
	EthNetwork          beaconprotocol.Network
	ValidatorController validator.Controller
	Executor            DutyExecutor
	GenesisEpoch        uint64
	DutyLimit           uint64
	ForkVersion         forksprotocol.ForkVersion
}

ControllerOptions holds the needed dependencies

type DutyController

type DutyController interface {
	Start()
	// CurrentSlotChan will trigger every slot
	CurrentSlotChan() <-chan uint64
}

DutyController interface for dispatching duties execution according to slot ticker

func NewDutyController

func NewDutyController(opts *ControllerOptions) DutyController

NewDutyController creates a new instance of DutyController

type DutyExecutor added in v0.1.8

type DutyExecutor interface {
	ExecuteDuty(duty *spectypes.Duty) error
}

DutyExecutor represents the component that executes duties

func NewReadOnlyExecutor added in v0.1.8

func NewReadOnlyExecutor(logger *zap.Logger) DutyExecutor

NewReadOnlyExecutor creates a dummy executor that is used to run in read mode

type DutyFetcher

type DutyFetcher interface {
	GetDuties(slot uint64) ([]spectypes.Duty, error)
}

DutyFetcher represents the component that manages duties

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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