events

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventScopeBlock = types.EventScope("tm-block")
	EventScopeTx    = types.EventScope("tm-tx")

	EndBlockEventPath   = types.EventPath("end-block")
	BeginBlockEventPath = types.EventPath("begin-block")
	CommitEventPath     = types.EventPath("commit")
)

Variables

This section is empty.

Functions

func MakeTxEventPath

func MakeTxEventPath(space string, path string, prefix string) types.EventPath

func PublishBlockEvent

func PublishBlockEvent(event BlockEvent)

func PublishTxEvent

func PublishTxEvent(msg types.TxMsg)

func SubscribeBlockEvent

func SubscribeBlockEvent(path types.EventPath, name string, handler types.EventHandler) error

func SubscribeTxEvent

func SubscribeTxEvent(eventPath types.EventPath, name string, handler TxEventHandler) error

func UnsubscribeBlockEvent

func UnsubscribeBlockEvent(path types.EventPath, name string)

func UnsubscribeTxEvent

func UnsubscribeTxEvent(eventPath types.EventPath, name string)

Types

type BeginBlockEvent

type BeginBlockEvent struct {
	BlockEvent
	Height int64
	Time   time.Time
}

func (BeginBlockEvent) Path

func (event BeginBlockEvent) Path() types.EventPath

type BlockEvent

type BlockEvent types.Event

type CommitEvent

type CommitEvent struct {
	BlockEvent
	Height  int64
	Size    int64
	AppHash []byte
}

func (CommitEvent) Path

func (event CommitEvent) Path() types.EventPath

type EndBlockEvent

type EndBlockEvent struct {
	BlockEvent
	Height int64
	Size   int
}

func (EndBlockEvent) Path

func (event EndBlockEvent) Path() types.EventPath

type TxEvent

type TxEvent struct {
	Type types.TxType
	Key  []byte
	// contains filtered or unexported fields
}

func NewTxEvent

func NewTxEvent(msg types.TxMsg) (event TxEvent)

func (TxEvent) Path

func (event TxEvent) Path() types.EventPath

type TxEventHandler

type TxEventHandler func(event TxEvent)

Jump to

Keyboard shortcuts

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