bus

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher(
	factory storage.ListenerFactory,
	blocks storage.IBlock,
	txs storage.ITx,
) (*Dispatcher, error)

func (*Dispatcher) Close

func (d *Dispatcher) Close() error

func (*Dispatcher) Observe

func (d *Dispatcher) Observe(channels ...string) *Observer

func (*Dispatcher) Start

func (d *Dispatcher) Start(ctx context.Context)

type Observer

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

func NewObserver

func NewObserver(channels ...string) *Observer

func (Observer) Blocks

func (observer Observer) Blocks() <-chan *storage.Block

func (Observer) Close

func (observer Observer) Close() error

func (Observer) Txs

func (observer Observer) Txs() <-chan *storage.Tx

Jump to

Keyboard shortcuts

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