triggers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceptor

type Acceptor interface {
	Accept(ctx *snow.Context, containerID ids.ID, container []byte) error
}

Acceptor is implemented when a struct is monitoring if a message is accepted

type EventDispatcher

type EventDispatcher struct {
	// contains filtered or unexported fields
}

EventDispatcher receives events from consensus and dispatches the events to triggers

func (*EventDispatcher) Accept

func (ed *EventDispatcher) Accept(ctx *snow.Context, containerID ids.ID, container []byte)

Accept is called when a transaction or block is accepted

func (*EventDispatcher) Deregister

func (ed *EventDispatcher) Deregister(identifier string) error

Deregister removes a handler from the system

func (*EventDispatcher) DeregisterChain

func (ed *EventDispatcher) DeregisterChain(chainID ids.ID, identifier string) error

DeregisterChain removes a chain handler from the system

func (*EventDispatcher) Initialize

func (ed *EventDispatcher) Initialize(log logging.Logger)

Initialize creates the EventDispatcher's initial values

func (*EventDispatcher) Issue

func (ed *EventDispatcher) Issue(ctx *snow.Context, containerID ids.ID, container []byte)

Issue is called when a transaction or block is issued

func (*EventDispatcher) Register

func (ed *EventDispatcher) Register(identifier string, handler interface{}) error

Register places a new handler into the system

func (*EventDispatcher) RegisterChain

func (ed *EventDispatcher) RegisterChain(chainID ids.ID, identifier string, handler interface{}) error

RegisterChain places a new chain handler into the system

func (*EventDispatcher) Reject

func (ed *EventDispatcher) Reject(ctx *snow.Context, containerID ids.ID, container []byte)

Reject is called when a transaction or block is rejected

type Issuer

type Issuer interface {
	Issue(ctx *snow.Context, containerID ids.ID, container []byte) error
}

Issuer is implemented when a struct is monitoring if a message is issued

type Rejector

type Rejector interface {
	Reject(ctx *snow.Context, containerID ids.ID, container []byte) error
}

Rejector is implemented when a struct is monitoring if a message is rejected

Jump to

Keyboard shortcuts

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