app

package
v0.0.0-...-fb3d230 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue is a thread safe queue.

func NewQueue

func NewQueue(size int) *Queue

NewQueue returns a new Queue configured with the given size.

func (*Queue) Pop

func (q *Queue) Pop() ([]byte, bool)

Pop pulls a slice of bytes off the queue and returns the slice. If the queue is empty the returned slice will be nil and the bool will be false.

func (*Queue) Push

func (q *Queue) Push(eb []byte)

Push adds a slice of bytes to the queue. If the queue is full the given slice will be dropped.

type Server

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

Server handles initilizing an HTTP server as well as a rfc 5425 message processor.

func NewServer

func NewServer(addr, datadogKey string, opts ...ServerOption) *Server

NewServer will start a listener on the given addr and configure a server for processing rfc5424 messages.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the address the listener is bound to.

func (*Server) Run

func (s *Server) Run()

Run will start the message processor and serve the HTTP server.

type ServerOption

type ServerOption func(*Server)

ServerOption is a func that can be passed into NewServer to configure optional settings on the Server.

func WithDatadogBaseURL

func WithDatadogBaseURL(baseURL string) ServerOption

WithDatadogBaseURL sets the base url for the datadog API.

Jump to

Keyboard shortcuts

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