processor

package
v0.0.0-...-5d8d6e7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter func() ([]byte, bool)

Getter is used to get rfc5424 encoded bytes to send to datadog.

type HTTPClient

type HTTPClient interface {
	Post(url, contentType string, body io.Reader) (*http.Response, error)
}

HTTPClient is used to communicate to the datadog API.

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

Processor gets rfc5424 messages and sends them to the datadog API.

func New

func New(g Getter, c HTTPClient, apiBaseURL, apiKey string) *Processor

New creates a new Processor.

func (*Processor) Run

func (p *Processor) Run()

Run reads from the Getter and writes to datadog. It blocks while reading.

Jump to

Keyboard shortcuts

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