{"modulePath":"github.com/pushchain/push-chain-node","version":"v0.0.43","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package push\n\nPackage push provides a client for listening to Push Chain events.\n\n## Constants\n\n```go\nconst DefaultPollInterval = 2 * time.Second\n```\n\n## Variables\n\n```go\nvar (\n\tErrNilClient      = errors.New(\"push client is nil\")\n\tErrNilDatabase    = errors.New(\"database is nil\")\n\tErrAlreadyRunning = errors.New(\"event listener is already running\")\n\tErrNotRunning     = errors.New(\"event listener is not running\")\n)\n```\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient implements the ChainClient interface for Push chain\n\n```go\nfunc NewClient(\n\tdatabase *db.DB,\n\tchainConfig *config.ChainSpecificConfig,\n\tpushCore *pushcore.Client,\n\tchainID string,\n\tlogger zerolog.Logger,\n) (*Client, error)\n```\nNewClient creates a new Push chain client\n\n```go\nfunc (c *Client) GetTxBuilder() (common.TxBuilder, error)\n```\nGetTxBuilder returns the TxBuilder for this chain Push chain does not support outbound transactions, so this always returns an error\n\n```go\nfunc (c *Client) IsHealthy() bool\n```\nIsHealthy checks if the Push chain RPC Client is healthy\n\n```go\nfunc (c *Client) Start(ctx context.Context) error\n```\nStart initializes and starts the Push chain client\n\n```go\nfunc (c *Client) Stop() error\n```\nStop gracefully shuts down the Push chain client\n\n```go\ntype Config struct {\n\tPollInterval time.Duration\n}\n```\nConfig holds configuration for the Push event listener.\n\n```go\ntype EventListener struct {\n\t// contains filtered or unexported fields\n}\n```\nEventListener polls Push chain for active TSS events and pending outbounds via gRPC, converts them to store.Events, and inserts them into the local DB.\n\n```go\nfunc NewEventListener(\n\tpushCore *pushcore.Client,\n\tdatabase *db.DB,\n\tlogger zerolog.Logger,\n\tchainConfig *config.ChainSpecificConfig,\n) (*EventListener, error)\n```\nNewEventListener creates a new Push event listener.\n\n```go\nfunc (el *EventListener) IsRunning() bool\n```\nIsRunning returns whether the event listener is currently running.\n\n```go\nfunc (el *EventListener) Start(ctx context.Context) error\n```\nStart begins polling for Push chain events.\n\n```go\nfunc (el *EventListener) Stop() error\n```\nStop gracefully stops the event listener.\n\n","path":"github.com/pushchain/push-chain-node/universalClient/chains/push","name":"push","synopsis":"Package push provides a client for listening to Push Chain events.","isRedistributable":true}
