Documentation
¶
Overview ¶
Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.