Documentation
¶
Overview ¶
Package pushwatcher provides a client for listening to Push Chain events.
Index ¶
Constants ¶
View Source
const DefaultPollInterval = 2 * time.Second
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the ChainClient interface for Push chain
func NewClient ¶
func NewClient( database *db.DB, chainConfig *config.ChainSpecificConfig, pushCore *pushcore.Client, chainID string, logger zerolog.Logger, ) (*Client, error)
NewClient creates a new Push chain client
type EventListener ¶
type EventListener struct {
// contains filtered or unexported fields
}
EventListener polls Push chain for active TSS events and pending outbounds via gRPC, converts them to store.Events, and inserts them into the local DB.
func NewEventListener ¶
func NewEventListener( pushCore *pushcore.Client, database *db.DB, logger zerolog.Logger, chainConfig *config.ChainSpecificConfig, ) (*EventListener, error)
NewEventListener creates a new Push event listener.
func (*EventListener) IsRunning ¶
func (el *EventListener) IsRunning() bool
IsRunning returns whether the event listener is currently running.
func (*EventListener) Start ¶
func (el *EventListener) Start(ctx context.Context) error
Start begins polling for Push chain events.
func (*EventListener) Stop ¶
func (el *EventListener) Stop() error
Stop gracefully stops the event listener.
Click to show internal directories.
Click to hide internal directories.