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 }
Process Wrapper function
Functions ¶
func ConvertYamlToJson ¶
Converting yaml Data to Json File. Process is needed to get command line arguments.
func FindConfigFile ¶ added in v1.300028.0
Finds config file from cmdline
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 Process ¶
type Process interface { Cwd() (string, error) CmdlineSlice() ([]string, error) Cmdline() (string, error) Terminate() error }
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:"RoleARN"` ProxyAddress string `yaml:"ProxyAddress"` Endpoint string `yaml:"Endpoint"` NoVerifySSL bool `yaml:"NoVerifySSL"` }
Daemon Yaml Configuration struct