jobs

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockHeaderWatcher

type BlockHeaderWatcher struct {
	job.Basic
	// contains filtered or unexported fields
}

BlockHeaderWatcher allows you to subscribe a basic job to a block header event.

func NewBlockHeaderWatcher

func NewBlockHeaderWatcher(basic job.Basic) *BlockHeaderWatcher

NewBlockHeaderWatcher creates a new BlockHeaderWatcher.

func (*BlockHeaderWatcher) Setup

func (w *BlockHeaderWatcher) Setup(ctx context.Context) error

func (*BlockHeaderWatcher) Subscribe

func (w *BlockHeaderWatcher) Subscribe(
	ctx context.Context,
) (ethereum.Subscription, chan *coretypes.Header, error)

func (*BlockHeaderWatcher) Teardown

func (w *BlockHeaderWatcher) Teardown() error

func (*BlockHeaderWatcher) Unsubscribe

func (w *BlockHeaderWatcher) Unsubscribe(context.Context)

type EthEventSub

type EthEventSub struct {
	job.Basic
	// contains filtered or unexported fields
}

EthEventSub allows you to subscribe a basic job to an ethereum event.

func NewEthSub

func NewEthSub(job job.Basic, contractAddr string, event string) *EthEventSub

NewEthSub creates a new EthEventSub.

func (*EthEventSub) Setup

func (j *EthEventSub) Setup(ctx context.Context) error

func (*EthEventSub) Subscribe

func (j *EthEventSub) Subscribe(
	ctx context.Context,
) (ethereum.Subscription, chan coretypes.Log, error)

Subscribe subscribes to an ethereum event.

func (*EthEventSub) Teardown

func (j *EthEventSub) Teardown() error

func (*EthEventSub) Unsubscribe

func (j *EthEventSub) Unsubscribe(_ context.Context)

Unsubscribe unsubscribes from an ethereum event.

type EthFilterSub

type EthFilterSub struct {
	job.Basic
	// contains filtered or unexported fields
}

EthFilterSub allows you to subscribe a basic job to an ethereum event.

func NewEthFilterSub

func NewEthFilterSub(job job.Basic, eventFilter ethereum.FilterQuery) *EthFilterSub

NewEthFilterSub creates a new EthFilterSub eventFilter is a ethereum.FilterQuery.

func (*EthFilterSub) Setup

func (j *EthFilterSub) Setup(ctx context.Context) error

func (*EthFilterSub) Subscribe

func (j *EthFilterSub) Subscribe(
	ctx context.Context,
) (ethereum.Subscription, chan coretypes.Log, error)

Subscribe subscribes to all events based on ethereum filter query.

func (*EthFilterSub) Teardown

func (j *EthFilterSub) Teardown() error

func (*EthFilterSub) Unsubscribe

func (j *EthFilterSub) Unsubscribe(_ context.Context)

Unsubscribe unsubscribes from filter query.

Jump to

Keyboard shortcuts

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