Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
func NewEventService ¶
func NewEventService(params EventServiceParams) *EventService
func (*EventService) Subscribe ¶
func (s *EventService) Subscribe(ctx context.Context, opts api.SubscribeOptions) (<-chan api.Event, error)
func (*EventService) Type ¶
func (s *EventService) Type() api.ServiceType
type EventServiceParams ¶
type Faucet ¶
type Faucet struct {
// contains filtered or unexported fields
}
Faucet implements api.Faucet.
Faucet aggregates faucet transactions and sends them once per block to ensure the correct ordering of signatures. Otherwise, the transactions could be reordered and fail due to timestamp/nonce errors. When a user submits a faucet request, the faucet appends the transaction and signature to the current batch, which is submitted to the network after receiving a block event.
func NewFaucet ¶
func NewFaucet(ctx context.Context, params FaucetParams) (*Faucet, error)
NewFaucet creates a new Faucet with the given parameters.
Callers must call Faucet.Stop or cancel the context when the faucet is no longer needed. Otherwise, NewFaucet will leak goroutines.
type FaucetParams ¶
type FaucetParams struct { Logger log.Logger Account *url.URL Key build.Signer Submitter api.Submitter Querier api.Querier Events api.EventService Amount uint64 }
FaucetParams are the parameters for a Faucet.
type MetricsService ¶
type MetricsService struct {
// contains filtered or unexported fields
}
func NewMetricsService ¶
func NewMetricsService(params MetricsServiceParams) *MetricsService
func (*MetricsService) Metrics ¶
func (s *MetricsService) Metrics(ctx context.Context, opts api.MetricsOptions) (*api.Metrics, error)
func (*MetricsService) Type ¶
func (s *MetricsService) Type() api.ServiceType
type MetricsServiceParams ¶
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func NewNetworkService ¶
func NewNetworkService(params NetworkServiceParams) *NetworkService
func (*NetworkService) NetworkStatus ¶
func (s *NetworkService) NetworkStatus(ctx context.Context, _ api.NetworkStatusOptions) (*api.NetworkStatus, error)
func (*NetworkService) Type ¶
func (s *NetworkService) Type() api.ServiceType
type NetworkServiceParams ¶
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func NewQuerier(params QuerierParams) *Querier
type QuerierParams ¶
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
func NewSequencer ¶
func NewSequencer(params SequencerParams) *Sequencer