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 (*Collector) WithMonitor ¶
func (self *Collector) WithMonitor(monitor monitoring.Monitor) *Collector
type Controller ¶
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 ¶
Gets a live stream of data item ids to send
func NewNotifier ¶
func (*Notifier) WithMonitor ¶
func (self *Notifier) WithMonitor(monitor monitoring.Monitor) *Notifier
type Poller ¶
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 (*Poller) WithMonitor ¶
func (self *Poller) WithMonitor(monitor monitoring.Monitor) *Poller
type Sender ¶
type Sender struct { *task.Task // Updated data items Output chan *model.DataItem // contains filtered or unexported fields }
func (*Sender) WithInputChannel ¶
func (*Sender) WithMonitor ¶
func (self *Sender) WithMonitor(monitor monitoring.Monitor) *Sender
type Store ¶
Periodically saves the state of processed data items
func (*Store) WithInputChannel ¶
func (*Store) WithMonitor ¶
func (self *Store) WithMonitor(monitor monitoring.Monitor) *Store
func (*Store) WithNetworkMonitor ¶
func (self *Store) WithNetworkMonitor(v *listener.NetworkMonitor) *Store