httpsender

package
v0.0.0-...-3c94f92 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: LGPL-3.0 Imports: 9 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 {
	Workers  int
	Logger   *logrus.Entry
	Debug    bool
	URL      string
	Insecure bool
}

Config exposes the configuration for an HTTP Sender

type HTTPSender

type HTTPSender struct {
	Client *http.Client

	Config
	// contains filtered or unexported fields
}

HTTPSender is a component for the rbforwarder pipeline that sends messages to an HTTP endpoint. It's a final component, so it will call Done() instead of Next() and further components shuld not be added after this component.

func (*HTTPSender) OnMessage

func (httpsender *HTTPSender) OnMessage(m *utils.Message, done utils.Done)

OnMessage is called when a new message should be sent via HTTP

func (*HTTPSender) Spawn

func (httpsender *HTTPSender) Spawn(id int) utils.Composer

Spawn initializes the HTTP component

func (*HTTPSender) Workers

func (httpsender *HTTPSender) Workers() int

Workers returns the number of workers

Jump to

Keyboard shortcuts

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