subscriber

package
v0.27.4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Log            *zap.Logger
	Endpoint       string
	DialTimeout    time.Duration
	StartFromBlock uint32
}

Params is a group of Subscriber constructor parameters.

type Subscriber

type Subscriber interface {
	SubscribeForNotification(...util.Uint160) (<-chan *subscriptions.NotificationEvent, error)
	UnsubscribeForNotification()
	BlockNotifications() (<-chan *block.Block, error)
	SubscribeForNotaryRequests(mainTXSigner util.Uint160) (<-chan *subscriptions.NotaryRequestEvent, error)
	Close()
}

Subscriber is an interface of the NotificationEvent listener.

func New

func New(ctx context.Context, p *Params) (Subscriber, error)

New is a constructs Neo:Morph event listener and returns Subscriber interface.

Jump to

Keyboard shortcuts

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