interact

package
v0.2.184 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker struct {
	*task.Task
	// contains filtered or unexported fields
}

Periodically gets the current network height from warp's GW and confirms bundle is FINALIZED

func NewChecker

func NewChecker(config *config.Config) (self *Checker)

Receives bundles that can be checked in bundlr

func (*Checker) WithDb

func (self *Checker) WithDb(db *gorm.DB) *Checker

func (*Checker) WithInputChannel

func (self *Checker) WithInputChannel(input <-chan *Payload) *Checker

func (*Checker) WithMonitor

func (self *Checker) WithMonitor(monitor monitoring.Monitor) *Checker

type Controller

type Controller struct {
	*task.Task
}

func NewController

func NewController(config *config.Config) (self *Controller, err error)

Main class that orchestrates everything

type Generator

type Generator struct {
	*task.Task

	Output chan *Payload
	// contains filtered or unexported fields
}

Periodically gets the current network height from warp's GW and confirms bundle is FINALIZED

func NewGenerator

func NewGenerator(config *config.Config) (self *Generator)

For every network height, fetches unfinished bundles

func (*Generator) WithClient

func (self *Generator) WithClient(v *sequencer.Client) *Generator

func (*Generator) WithMonitor

func (self *Generator) WithMonitor(monitor monitoring.Monitor) *Generator

type Input

type Input struct {
	Timestamp time.Time `json:"t"`
}

type Payload

type Payload struct {
	DataItem  *bundlr.BundleItem
	Timestamp time.Time
}

type Sender

type Sender struct {
	*task.Task

	// Finalized interactions
	Output chan *Payload
	// contains filtered or unexported fields
}

Sends data item to sequencer

func NewSender

func NewSender(config *config.Config) (self *Sender)

Receives bundles that can be checked in bundlr

func (*Sender) WithClient

func (self *Sender) WithClient(client *sequencer.Client) *Sender

func (*Sender) WithInputChannel

func (self *Sender) WithInputChannel(input <-chan *Payload) *Sender

func (*Sender) WithMonitor

func (self *Sender) WithMonitor(monitor monitoring.Monitor) *Sender

Jump to

Keyboard shortcuts

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