Documentation ¶
Overview ¶
Package ethclient is a listener that listens to an Ethereum client.
Index ¶
- type Parameter
- func WithAddress(address string) Parameter
- func WithBlockDelay(delay uint32) Parameter
- func WithBlockSpecifier(specifier string) Parameter
- func WithBlockTriggers(triggers []*handlers.BlockTrigger) Parameter
- func WithClientLogLevel(logLevel zerolog.Level) Parameter
- func WithEarliestBlock(block int32) Parameter
- func WithEventTriggers(triggers []*handlers.EventTrigger) Parameter
- func WithInterval(interval time.Duration) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithMetadataDBPath(path string) Parameter
- func WithMonitor(monitor metrics.Service) Parameter
- func WithTimeout(timeout time.Duration) Parameter
- func WithTxTriggers(triggers []*handlers.TxTrigger) Parameter
- type Service
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 WithAddress ¶
WithAddress sets the address of the Ethereum client.
func WithBlockDelay ¶
WithBlockDelay sets the number of blocks to delay before passing on to the handlers, allowing avoidance of reorgs. Ignored if block specifier is provided.
func WithBlockSpecifier ¶ added in v1.2.1
WithBlockSpecifier sets the specifier for the block to handle. This override block delay if supplied.
func WithBlockTriggers ¶
func WithBlockTriggers(triggers []*handlers.BlockTrigger) Parameter
WithBlockTriggers sets the block triggers for the listener.
func WithClientLogLevel ¶ added in v1.5.0
WithClientLogLevel sets the log level for the clients used by the listener.
func WithEarliestBlock ¶ added in v1.2.7
WithEarliestBlock sets the block number from which to start listening.
func WithEventTriggers ¶
func WithEventTriggers(triggers []*handlers.EventTrigger) Parameter
WithEventTriggers sets the event triggers for the listener.
func WithInterval ¶
WithInterval sets the interval between polls.
func WithLogLevel ¶
WithLogLevel sets the log level for the listener.
func WithMetadataDBPath ¶ added in v1.3.0
WithMetadataDBPath sets the path of the metadata database.
func WithMonitor ¶
WithMonitor sets the metrics monitor.
func WithTimeout ¶
WithTimeout sets the timeout for requests made to the Ethereum client.
func WithTxTriggers ¶
WithTxTriggers sets the transaction triggers for the listener.