Documentation ¶
Overview ¶
Package mock provides a mock probe database.
Index ¶
- type ErroringService
- func (s *ErroringService) BeginTx(ctx context.Context) (context.Context, context.CancelFunc, error)
- func (s *ErroringService) CommitTx(ctx context.Context) error
- func (s *ErroringService) Metadata(ctx context.Context, key string) ([]byte, error)
- func (s *ErroringService) SetAggregateAttestation(ctx context.Context, aggregateAttestation *probedb.AggregateAttestation) error
- func (s *ErroringService) SetAttestationSummary(ctx context.Context, summary *probedb.AttestationSummary) error
- func (s *ErroringService) SetBlockDelay(ctx context.Context, delay *probedb.Delay) error
- func (s *ErroringService) SetHeadDelay(ctx context.Context, delay *probedb.Delay) error
- func (s *ErroringService) SetMetadata(ctx context.Context, key string, value []byte) error
- type Service
- func (s *Service) BeginTx(ctx context.Context) (context.Context, context.CancelFunc, error)
- func (s *Service) CommitTx(ctx context.Context) error
- func (s *Service) Metadata(ctx context.Context, key string) ([]byte, error)
- func (s *Service) SetAggregateAttestation(ctx context.Context, aggregateAttestation *probedb.AggregateAttestation) error
- func (s *Service) SetAttestationSummary(ctx context.Context, summary *probedb.AttestationSummary) error
- func (s *Service) SetBlockDelay(ctx context.Context, delay *probedb.Delay) error
- func (s *Service) SetHeadDelay(ctx context.Context, delay *probedb.Delay) error
- func (s *Service) SetMetadata(ctx context.Context, key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErroringService ¶
type ErroringService struct{}
ErroringService is a mock that errors.
func NewErroring ¶
func NewErroring() *ErroringService
NewErroring returns a mock probe database that errors.
func (*ErroringService) BeginTx ¶
func (s *ErroringService) BeginTx(ctx context.Context) (context.Context, context.CancelFunc, error)
BeginTx begins a transaction.
func (*ErroringService) CommitTx ¶
func (s *ErroringService) CommitTx(ctx context.Context) error
CommitTx commits a transaction.
func (*ErroringService) SetAggregateAttestation ¶ added in v0.3.1
func (s *ErroringService) SetAggregateAttestation(ctx context.Context, aggregateAttestation *probedb.AggregateAttestation) error
SetAggregateAttestation sets an aggregate attestation.
func (*ErroringService) SetAttestationSummary ¶ added in v0.3.1
func (s *ErroringService) SetAttestationSummary(ctx context.Context, summary *probedb.AttestationSummary) error
SetAttestationSummary sets an attestation summary.
func (*ErroringService) SetBlockDelay ¶
SetBlockDelay sets a block delay.
func (*ErroringService) SetHeadDelay ¶
SetHeadDelay sets a head delay.
func (*ErroringService) SetMetadata ¶
SetMetadata sets a metadata key to a JSON value.
type Service ¶
type Service struct{}
Service is a mock.
func (*Service) SetAggregateAttestation ¶ added in v0.3.1
func (s *Service) SetAggregateAttestation(ctx context.Context, aggregateAttestation *probedb.AggregateAttestation) error
SetAggregateAttestation sets an aggregate attestation.
func (*Service) SetAttestationSummary ¶ added in v0.3.1
func (s *Service) SetAttestationSummary(ctx context.Context, summary *probedb.AttestationSummary) error
SetAttestationSummary sets an attestation summary.
func (*Service) SetBlockDelay ¶
SetBlockDelay sets a block delay.
func (*Service) SetHeadDelay ¶
SetHeadDelay sets a head delay.
Click to show internal directories.
Click to hide internal directories.