Documentation ¶
Index ¶
- type Parameter
- func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter
- func WithFarFutureEpoch(farFutureEpoch phase0.Epoch) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithMonitor(monitor metrics.ValidatorsManagerMonitor) Parameter
- func WithValidatorsProvider(provider eth2client.ValidatorsProvider) Parameter
- type Service
- func (s *Service) RefreshValidatorsFromBeaconNode(ctx context.Context, pubKeys []phase0.BLSPubKey) error
- func (s *Service) ValidatorStateAtEpoch(ctx context.Context, index phase0.ValidatorIndex, epoch phase0.Epoch) (api.ValidatorState, error)
- func (s *Service) ValidatorsByIndex(ctx context.Context, indices []phase0.ValidatorIndex) map[phase0.ValidatorIndex]*phase0.Validator
- func (s *Service) ValidatorsByPubKey(ctx context.Context, pubKeys []phase0.BLSPubKey) map[phase0.ValidatorIndex]*phase0.Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithClientMonitor ¶
func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter
WithClientMonitor sets the client monitor for the module.
func WithFarFutureEpoch ¶
WithFarFutureEpoch sets the far future epoch.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithMonitor ¶
func WithMonitor(monitor metrics.ValidatorsManagerMonitor) Parameter
WithMonitor sets the monitor for the module.
func WithValidatorsProvider ¶
func WithValidatorsProvider(provider eth2client.ValidatorsProvider) Parameter
WithValidatorsProvider sets the validator status provider.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the manager for validators.
func (*Service) RefreshValidatorsFromBeaconNode ¶
func (s *Service) RefreshValidatorsFromBeaconNode(ctx context.Context, pubKeys []phase0.BLSPubKey) error
RefreshValidatorsFromBeaconNode refreshes the local store from the beacon node. This is an expensive operation, and should not be called in the validating path.
func (*Service) ValidatorStateAtEpoch ¶
func (s *Service) ValidatorStateAtEpoch(ctx context.Context, index phase0.ValidatorIndex, epoch phase0.Epoch) (api.ValidatorState, error)
ValidatorStateAtEpoch returns the validator's state at the given epoch.
func (*Service) ValidatorsByIndex ¶
func (s *Service) ValidatorsByIndex(ctx context.Context, indices []phase0.ValidatorIndex) map[phase0.ValidatorIndex]*phase0.Validator
ValidatorsByIndex fetches the requested validators from local store given their indices.