Documentation ¶
Overview ¶
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GetProcesses = func() ([]Process, error) { processList, err := process.Processes() if err != nil { return nil, err } var xrayProcesses []Process for _, p := range processList { curName, err := p.Name() if err != nil { continue } if curName == "xray" { xrayProcesses = append(xrayProcesses, p) } } return xrayProcesses, nil }
Functions ¶
func ConvertYamlToJson ¶
Converting yaml Data to Json File. Pid is needed to get command line arguments of the process (if Daemon is running as a process and not a service).
func GetPathFromArgs ¶
get the config file path from arguments
Types ¶
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
func (*Flag) BoolVarF ¶
BoolVarF defines 2 bool flags with specified name and shortName, default value, and usage string. The argument ptr points to a bool variable in which to store the value of the flag.
func (*Flag) IntVarF ¶
IntVarF defines 2 int flags for specified name and shortName with default value, and usage string. The argument ptr points to an int variable in which to store the value of the flag.
func (*Flag) StringVarF ¶
StringVarF defines 2 string flags for specified name and shortName, default value, and usage string. The argument ptr points to a string variable in which to store the value of the flag.
type JsonConfig ¶
type JsonConfig struct { Traces struct { TracesCollected struct { Xray struct { BindAddress string `json:"bind_address"` TcpProxy struct { BindAddress string `json:"bind_address"` } `json:"tcp_proxy"` } `json:"xray"` } `json:"traces_collected"` Concurrency int `json:"concurrency"` BufferSizeMB int `json:"buffer_size_mb"` ResourceArn string `json:"resource_arn"` LocalMode bool `json:"local_mode"` //local Insecure bool `json:"insecure"` //noverifyssl Credentials struct { RoleArn string `json:"role_arn"` } `json:"credentials"` EndpointOverride string `json:"endpoint_override"` //endpoint RegionOverride string `json:"region_override"` //region ProxyOverride string `json:"proxy_override"` } `json:"traces"` }
type Process ¶
func FindAllDaemons ¶
Finds all Daemons and returns their pid
type YamlConfig ¶
type YamlConfig struct { TotalBufferSizeMB int `yaml:"TotalBufferSizeMB"` Concurrency int `yaml:"Concurrency"` Region string `yaml:"Region"` Socket struct { UDPAddress string `yaml:"UDPAddress"` TCPAddress string `yaml:"TCPAddress"` } `yaml:"Socket"` LocalMode bool `yaml:"LocalMode"` ResourceARN string `yaml:"ResourceARN"` RoleARN string `yaml:"string"` ProxyAddress string `yaml:"ProxyAddress"` Endpoint string `yaml:"Endpoint"` NoVerifySSL bool `yaml:"NoVerifySSL"` }