udppoller

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Transport is the network transport protocol used
	// by the poller
	Transport = "udp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Transport          string
	Endpoint           string
	NumOfPollerToStart int
}

Config represents the configurations needed to start the UDP poller

type Poller

type Poller interface {
	SegmentsChan() <-chan RawSegment
	Start(receiverLongTermCtx context.Context)
	Close() error
}

Poller represents one or more goroutines that are polling from a UDP socket

func New

func New(cfg *Config, set receiver.CreateSettings) (Poller, error)

New creates a new UDP poller

type RawSegment

type RawSegment struct {
	// Payload is the raw bytes that represent one X-Ray segment.
	Payload []byte
	// Ctx is the short-lived context created per raw segment received
	Ctx context.Context
}

RawSegment represents a raw X-Ray segment document.

Jump to

Keyboard shortcuts

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