Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundler ¶
type Bundler struct { *task.Task // Ids of successfully bundled interactions Output chan *Confirmation // contains filtered or unexported fields }
func NewBundler ¶
Receives bundle items from the input channel and sends them to bundlr
func (*Bundler) WithInputChannel ¶
func (self *Bundler) WithInputChannel(in chan *model.BundleItem) *Bundler
func (*Bundler) WithIrysClient ¶ added in v0.2.127
func (*Bundler) WithMonitor ¶
func (self *Bundler) WithMonitor(monitor monitoring.Monitor) *Bundler
type Collector ¶
type Collector struct { *task.Task // Data about the interactions that need to be bundled Output chan *model.BundleItem // contains filtered or unexported fields }
Gets the unbundled interactions and puts them on the output channel
func NewCollector ¶
Sets up the task of fetching interactions to be bundled Collects it from two sources: 1. Live source of interactions that need to be bundled 2. Interactions that somehow wasn't sent through the notification channel. Probably because of a restart.
func (*Collector) WithMonitor ¶
func (self *Collector) WithMonitor(monitor monitoring.Monitor) *Collector
type Confirmation ¶
type Confirmer ¶
type Confirmer struct { *task.SinkTask[*Confirmation] // contains filtered or unexported fields }
Periodically saves the confirmation state of the bundlet interactions This is done to prevent flooding database with bundle_items state updates
func NewConfirmer ¶
func (*Confirmer) WithInputChannel ¶
func (self *Confirmer) WithInputChannel(input chan *Confirmation) *Confirmer
func (*Confirmer) WithMonitor ¶
func (self *Confirmer) WithMonitor(monitor monitoring.Monitor) *Confirmer
func (*Confirmer) WithNetworkMonitor ¶
func (self *Confirmer) WithNetworkMonitor(v *listener.NetworkMonitor) *Confirmer
type Controller ¶
func NewController ¶
func NewController(config *config.Config) (self *Controller, err error)
+---------------+ | Collector | | | | | | +-----------+ | | | Poller | | +----------+ +-----------+ +-----------------+ | +-----------+ | tx | | pd | | network_info | | | +------------>| Bundler +-------->| Confirmer |<-------------- | Network Monitor | | +-----------+ | | | | | | | | | Notifier | | +----------+ +-----------+ +-----------------+ | +-----------+ | | | +---------------+ Main class that orchestrates main syncer functionalities
type Notifier ¶
Gets a live stream of unbundled intearctions, parses them and puts them on the output channel
func NewNotifier ¶
func (*Notifier) WithMonitor ¶
func (self *Notifier) WithMonitor(monitor monitoring.Monitor) *Notifier
func (*Notifier) WithOutputChannel ¶
func (self *Notifier) WithOutputChannel(bundleItems chan *model.BundleItem) *Notifier
type Poller ¶
Periodically gets the unbundled interactions and puts them on the output channel Gets interactions that somehow didn't get sent through the notification channel. Probably because of a restart.
func (*Poller) WithMonitor ¶
func (self *Poller) WithMonitor(monitor monitoring.Monitor) *Poller
func (*Poller) WithOutputChannel ¶
func (self *Poller) WithOutputChannel(bundleItems chan *model.BundleItem) *Poller