event

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package event describes the types and methods to interact with the events.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL