send

package
v0.2.201 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	*task.Task

	// Data items to be sent out
	Output chan *model.DataItem
	// contains filtered or unexported fields
}

Gets data items from 2 sources

func NewCollector

func NewCollector(config *config.Config, db *gorm.DB) (self *Collector)

func (*Collector) WithMonitor

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

type Controller

type Controller struct {
	*task.Task
}

func NewController

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

+---------------+ | Collector | | | | | | +-----------+ | | | Poller | | +----------+ +-----------+ +-----------------+ | +-----------+ | tx | | pd | | network_info | | | +------------>| Sender +-------->| Store |<-------------- | Network Monitor | | +-----------+ | | | | | | | | | Notifier | | +----------+ +-----------+ +-----------------+ | +-----------+ | | | +---------------+ Main class that orchestrates main syncer functionalities

type Notifier

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

Gets a live stream of data item ids to send

func NewNotifier

func NewNotifier(config *config.Config) (self *Notifier)

func (*Notifier) WithDB

func (self *Notifier) WithDB(db *gorm.DB) *Notifier

func (*Notifier) WithMonitor

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

func (*Notifier) WithOutputChannel

func (self *Notifier) WithOutputChannel(bundleItems chan *model.DataItem) *Notifier

type Poller

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

Periodically gets pending data items and puts them on the output channel Gets data items that somehow didn't get sent through the notification channel.

func NewPoller

func NewPoller(config *config.Config) (self *Poller)

func (*Poller) WithDB

func (self *Poller) WithDB(db *gorm.DB) *Poller

func (*Poller) WithMonitor

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

func (*Poller) WithOutputChannel

func (self *Poller) WithOutputChannel(v chan *model.DataItem) *Poller

type Sender

type Sender struct {
	*task.Task

	// Updated data items
	Output chan *model.DataItem
	// contains filtered or unexported fields
}

func NewSender

func NewSender(config *config.Config, db *gorm.DB) (self *Sender)

Receives bundle items from the input channel and sends them to bundlr

func (*Sender) WithInputChannel

func (self *Sender) WithInputChannel(in chan *model.DataItem) *Sender

func (*Sender) WithIrysClient added in v0.2.127

func (self *Sender) WithIrysClient(client *bundlr.Client) *Sender

func (*Sender) WithMonitor

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

func (*Sender) WithTurboClient added in v0.2.127

func (self *Sender) WithTurboClient(client *turbo.Client) *Sender

type Store

type Store struct {
	*task.Hole[*model.DataItem]
	// contains filtered or unexported fields
}

Periodically saves the state of processed data items

func NewStore

func NewStore(config *config.Config) (self *Store)

func (*Store) WithDB

func (self *Store) WithDB(db *gorm.DB) *Store

func (*Store) WithInputChannel

func (self *Store) WithInputChannel(input chan *model.DataItem) *Store

func (*Store) WithMonitor

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

func (*Store) WithNetworkMonitor

func (self *Store) WithNetworkMonitor(v *listener.NetworkMonitor) *Store

Jump to

Keyboard shortcuts

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