services

package
v0.0.192 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Client

type Client string
const (
	ClientUnknown    Client = "unknown"
	ClientLighthouse Client = "lighthouse"
	ClientNimbus     Client = "nimbus"
	ClientTeku       Client = "teku"
	ClientPrysm      Client = "prysm"
	ClientLodestar   Client = "lodestar"
)

func ClientFromString

func ClientFromString(client string) Client

type DutiesService added in v0.0.139

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

func NewDutiesService added in v0.0.139

func NewDutiesService(log logrus.FieldLogger, sbeacon beacon.Node, metadata *MetadataService) DutiesService

func (*DutiesService) FetchBeaconCommittee added in v0.0.139

func (m *DutiesService) FetchBeaconCommittee(ctx context.Context, epoch phase0.Epoch) ([]*v1.BeaconCommittee, error)

func (*DutiesService) GetLastCommitteeIndex added in v0.0.139

func (m *DutiesService) GetLastCommitteeIndex(ctx context.Context, slot phase0.Slot) (*phase0.CommitteeIndex, error)

func (*DutiesService) GetValidatorIndex added in v0.0.139

func (m *DutiesService) GetValidatorIndex(epoch phase0.Epoch, slot phase0.Slot, committeeIndex phase0.CommitteeIndex, position uint64) (phase0.ValidatorIndex, error)

func (*DutiesService) Name added in v0.0.139

func (m *DutiesService) Name() Name

func (*DutiesService) OnBeaconCommittee added in v0.0.139

func (m *DutiesService) OnBeaconCommittee(fn func(phase0.Epoch, []*v1.BeaconCommittee) error)

func (*DutiesService) OnReady added in v0.0.139

func (m *DutiesService) OnReady(ctx context.Context, fn func(context.Context) error)

func (*DutiesService) Ready added in v0.0.139

func (m *DutiesService) Ready(ctx context.Context) error

func (*DutiesService) Start added in v0.0.139

func (m *DutiesService) Start(ctx context.Context) error

func (*DutiesService) Stop added in v0.0.139

func (m *DutiesService) Stop(ctx context.Context) error

type MetadataService

type MetadataService struct {
	Network *networks.Network

	Genesis *v1.Genesis
	Spec    *state.Spec
	// contains filtered or unexported fields
}

func NewMetadataService

func NewMetadataService(log logrus.FieldLogger, sbeacon beacon.Node) MetadataService

func (*MetadataService) Client

func (m *MetadataService) Client(ctx context.Context) string

func (*MetadataService) DeriveNetwork

func (m *MetadataService) DeriveNetwork(_ context.Context) error

func (*MetadataService) Name

func (m *MetadataService) Name() Name

func (*MetadataService) NodeVersion

func (m *MetadataService) NodeVersion(_ context.Context) string

func (*MetadataService) OnReady

func (m *MetadataService) OnReady(ctx context.Context, cb func(context.Context) error)

func (*MetadataService) OverrideNetworkName

func (m *MetadataService) OverrideNetworkName(name string)

func (*MetadataService) Ready

func (m *MetadataService) Ready(ctx context.Context) error

func (*MetadataService) RefreshAll

func (m *MetadataService) RefreshAll(ctx context.Context) error

func (*MetadataService) Start

func (m *MetadataService) Start(ctx context.Context) error

func (*MetadataService) Stop

func (m *MetadataService) Stop(ctx context.Context) error

func (*MetadataService) Wallclock

type Name

type Name string

type Service

type Service interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Ready(ctx context.Context) error
	OnReady(ctx context.Context, cb func(ctx context.Context) error)
	Name() Name
}

Jump to

Keyboard shortcuts

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