listener

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockEventListener

type BlockEventListener interface {
	CheckPoint() uint64
	Close()
	Events()
}

type Handler

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

func NewHandler

func NewHandler(listener Listener) *Handler

func (*Handler) Delete

func (handler *Handler) Delete(c *fiber.Ctx) error

func (*Handler) Deregister

func (handler *Handler) Deregister(c *fiber.Ctx) error

func (*Handler) List

func (handler *Handler) List(c *fiber.Ctx) error

func (*Handler) Register

func (handler *Handler) Register(c *fiber.Ctx) error

type Injector

type Injector interface {
	InjectNetworks(...*models.Network) error
	InjectBlocks(...*models.Block) error
	InjectTransactions(...*models.Transaction) error
	DeleteNetwork(string) error
}

func NewLogInjector

func NewLogInjector(logger func(args ...interface{})) Injector

func NewPQInjector

func NewPQInjector(db *pg.DB) (Injector, error)

type Listener

type Listener interface {
	Selector() Selector
	Register(*network.Network) error
	Deregister(string) error
	Delete(string) error
}

func NewListener

func NewListener(ctx context.Context, errq errorsq.Errorsq, injector Injector, selector Selector) (Listener, error)

type Selector

type Selector interface {
	Networks(fields ...string) ([]models.Network, error)
	Network(nid string) (*models.Network, error)
	NetworkStartAt(nid string) (uint64, error)
}

func NewPQSelector

func NewPQSelector(db *pg.DB) (Selector, error)

Jump to

Keyboard shortcuts

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