subscriber

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrStaleNode is returned from [New] when StartFromBlock requirement
	// specified in [Params] is not satisfied by the given node.
	ErrStaleNode = errors.New("RPC node is not yet up to date")
)

Functions

This section is empty.

Types

type NotificationChannels added in v0.36.0

type NotificationChannels struct {
	BlockCh          <-chan *block.Block
	NotificationsCh  <-chan *state.ContainedNotificationEvent
	NotaryRequestsCh <-chan *result.NotaryRequestEvent
}

type Params

type Params struct {
	Log            *zap.Logger
	StartFromBlock uint32
	Client         *client.Client
}

Params is a group of Subscriber constructor parameters.

type Subscriber

type Subscriber interface {
	SubscribeForNotification(...util.Uint160) error
	BlockNotifications() error
	SubscribeForNotaryRequests(mainTXSigner util.Uint160) error

	NotificationChannels() NotificationChannels

	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