Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client[H commontypes.Head[BLOCK_HASH], S Subscription, ID txmgrtypes.ID, BLOCK_HASH commontypes.Hashable] interface { HeadByNumber(ctx context.Context, number *big.Int) (head H, err error) HeadByHash(ctx context.Context, hash BLOCK_HASH) (head H, err error) ChainID() (id ID, err error) // SubscribeNewHead is the method in which the client receives new Head. // It can be implemented differently for each chain i.e websocket, polling, etc SubscribeNewHead(ctx context.Context, ch chan<- H) (S, error) }
type Subscription ¶
type Subscription interface { // Unsubscribe cancels the sending of events to the data channel // and closes the error channel. Unsubscribe() // Err returns the subscription error channel. The error channel receives // a value if there is an issue with the subscription (e.g. the network connection // delivering the events has been closed). Only one value will ever be sent. // The error channel is closed by Unsubscribe. Err() <-chan error }
Click to show internal directories.
Click to hide internal directories.