Documentation ¶
Overview ¶
Package event describes the types and methods to interact with the events.
Index ¶
- type Subscriber
- type SubscriptionOption
- func FilterApproval(filtered chan<- types.Approval) SubscriptionOption
- func FilterJobTransition(filtered chan<- types.JobTransition) SubscriptionOption
- func FilterNewJobRequest(filtered chan<- types.NewJobRequest) SubscriptionOption
- func FilterTransfer(filtered chan<- types.Transfer) SubscriptionOption
- type SubscriptionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscriber ¶
type Subscriber interface { // Subscribe to metascheduler events. SubscribeEvents( ctx context.Context, opts ...SubscriptionOption, ) (ethereum.Subscription, error) }
Subscriber watches smart-contract events.
type SubscriptionOption ¶
type SubscriptionOption func(*SubscriptionOptions)
SubscriptionOption applies default and optional parameters to the SubscribeEvents method.
func FilterApproval ¶
func FilterApproval(filtered chan<- types.Approval) SubscriptionOption
FilterApproval allows taking the Approval events from the subscription.
func FilterJobTransition ¶
func FilterJobTransition( filtered chan<- types.JobTransition, ) SubscriptionOption
FilterJobTransition allows taking the JobTransition events from the subscription.
func FilterNewJobRequest ¶
func FilterNewJobRequest( filtered chan<- types.NewJobRequest, ) SubscriptionOption
FilterNewJobRequest allows taking the NewJobRequest events from the subscription.
func FilterTransfer ¶
func FilterTransfer(filtered chan<- types.Transfer) SubscriptionOption
FilterTransfer allows taking the Transfer events from the subscription.
type SubscriptionOptions ¶
type SubscriptionOptions struct { NewJobRequestChan chan<- types.NewJobRequest JobTransitionChan chan<- types.JobTransition TransferChan chan<- types.Transfer ApprovalChan chan<- types.Approval }
SubscriptionOptions contains the channels used to pass events.
Click to show internal directories.
Click to hide internal directories.