sender

package
v0.0.0-...-9b4e594 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Broker topic name to send event with file process result
	EventTopic string `yaml:"topic" json:"topic"`

	// Number of workers to publish file to storage
	Workers int `yaml:"workers" json:"workers"`

	// Minimum seconds between each collect loop
	CollectDelay int `yaml:"delay" json:"delay"`

	CollectorCfg collector.Config `json:"collect" yaml:"collect"`
}

func (Config) Validate

func (c Config) Validate() error

type Sender

type Sender struct {
	ID int
	// contains filtered or unexported fields
}

func New

func New(
	processID int, config Config, storage services.Storage, fileServer services.FileServer, broker services.Broker,
) (*Sender, error)

func (*Sender) Start

func (s *Sender) Start()

func (*Sender) Stop

func (s *Sender) Stop()

Jump to

Keyboard shortcuts

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