Documentation ¶
Index ¶
- type Parameter
- func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter
- func WithFarFutureEpoch(farFutureEpoch spec.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 []spec.BLSPubKey) error
- func (s *Service) ValidatorStateAtEpoch(ctx context.Context, index spec.ValidatorIndex, epoch spec.Epoch) (api.ValidatorState, error)
- func (s *Service) ValidatorsByIndex(ctx context.Context, indices []spec.ValidatorIndex) map[spec.ValidatorIndex]*spec.Validator
- func (s *Service) ValidatorsByPubKey(ctx context.Context, pubKeys []spec.BLSPubKey) map[spec.ValidatorIndex]*spec.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 []spec.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 spec.ValidatorIndex, epoch spec.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 []spec.ValidatorIndex) map[spec.ValidatorIndex]*spec.Validator
ValidatorsByIndex fetches the requested validators from local store given their indices.