daemoncfg

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonEndpoints

type DaemonEndpoints struct {
	// UDPAddr represents UDP endpoint for segments to be sent by emitter.
	UDPAddr *net.UDPAddr
	// TCPAddr represents TCP endpoint of the daemon to make sampling API calls.
	TCPAddr *net.TCPAddr
}

DaemonEndpoints stores X-Ray daemon configuration about the ip address and port for UDP and TCP port. It gets the address string from "AWS_TRACING_DAEMON_ADDRESS" and then from recorder's configuration for DaemonAddr. A notation of '127.0.0.1:2000' or 'tcp:127.0.0.1:2000 udp:127.0.0.2:2001' or 'udp:127.0.0.1:2000 tcp:127.0.0.2:2001' are both acceptable. The first one means UDP and TCP are running at the same address. Notation 'hostname:2000' or 'tcp:hostname:2000 udp:hostname:2001' or 'udp:hostname:2000 tcp:hostname:2001' are also acceptable. By default it assumes a X-Ray daemon running at 127.0.0.1:2000 listening to both UDP and TCP traffic.

func GetDaemonEndpoints

func GetDaemonEndpoints() *DaemonEndpoints

GetDaemonEndpoints returns DaemonEndpoints.

func GetDaemonEndpointsFromEnv

func GetDaemonEndpointsFromEnv() (*DaemonEndpoints, error)

GetDaemonEndpointsFromEnv resolves the daemon address if set in the environment variable.

func GetDaemonEndpointsFromString

func GetDaemonEndpointsFromString(dAddr string) (*DaemonEndpoints, error)

GetDaemonEndpointsFromString parses provided daemon address if the environment variable is invalid or not set. DaemonEndpoints is non nil if the env variable or provided address is valid.

func GetDefaultDaemonEndpoints

func GetDefaultDaemonEndpoints() *DaemonEndpoints

GetDefaultDaemonEndpoints returns the default UDP and TCP address of the daemon.

Jump to

Keyboard shortcuts

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