Documentation
¶
Index ¶
- func FetchRemoteList(gl *Global, maxNumRemoteTargets int, maxNumSrcTCPPorts uint16, ...) error
- func GetHostname(logger *log.Logger) (string, error)
- func ResolveDNSTargets(remotes RemoteStore, grc *RemoteConfig, DNSRefresh *time.Ticker, ...)
- type AppConfig
- type ArachneConfiguration
- type BasicConfig
- type CLIConfig
- type Extended
- type Global
- type OrchestratorConfig
- type Remote
- type RemoteConfig
- type RemoteFileConfig
- type RemoteStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchRemoteList ¶
func FetchRemoteList( gl *Global, maxNumRemoteTargets int, maxNumSrcTCPPorts uint16, minBatchInterval time.Duration, HTTPResponseHeaderTimeout time.Duration, orchestratorRESTConf string, kill chan struct{}, logger *log.Logger, ) error
FetchRemoteList fetches the configuration file from local path or, remotely, from Arachne Orchestrator.
func GetHostname ¶
GetHostname returns the hostname.
func ResolveDNSTargets ¶
func ResolveDNSTargets( remotes RemoteStore, grc *RemoteConfig, DNSRefresh *time.Ticker, wg *sync.WaitGroup, kill chan struct{}, logger *log.Logger, )
ResolveDNSTargets resolves the DNS names of the IP addresses of all echo targets and the localhost.
Types ¶
type AppConfig ¶
type AppConfig struct {
Logging *zap.Config
Verbose bool
PIDPath string
Orchestrator OrchestratorConfig
StandaloneTargetConfig string
Metrics metrics.Config
}
AppConfig holds the info parsed from the local YAML config file.
type ArachneConfiguration ¶
type ArachneConfiguration struct {
PIDPath string `yaml:"pidPath"`
Orchestrator OrchestratorConfig `yaml:"orchestrator"`
StandaloneTargetConfig string `yaml:"standaloneTargetConfig"`
}
ArachneConfiguration contains specific configuration to Arachne.
type BasicConfig ¶
type BasicConfig struct {
Logging log.Config `yaml:"logging"`
Arachne ArachneConfiguration `yaml:"arachne"`
}
BasicConfig holds the basic parameter configurations for the application.
type CLIConfig ¶
type CLIConfig struct {
ConfigFile *string
Foreground *bool
ReceiverOnlyMode *bool
SenderOnlyMode *bool
}
CLIConfig holds the info parsed from CLI.
type Extended ¶
Extended holds the parameter configurations implemented by outside callers.
type Global ¶
type Global struct {
App *AppConfig
CLI *CLIConfig
RemoteConfig *RemoteConfig
Remotes RemoteStore
}
Global holds the global application info.
type OrchestratorConfig ¶
type OrchestratorConfig struct {
Enabled bool `yaml:"enabled"`
AddrPort string `yaml:"addrport"`
RESTVersion string `yaml:"restVersion"`
}
OrchestratorConfig contains configuration for the Arachne Orchestrator.
type Remote ¶
Remote holds the info for every target to be echoed.
type RemoteConfig ¶
type RemoteConfig struct {
Location string
HostName string
SrcAddress net.IP
SrcTCPPortRange tcp.PortRange
InterfaceName string
TargetTCPPort layers.TCPPort
Timeout time.Duration
BatchInterval time.Duration
QoSEnabled bool
ResolveDNS bool
DNSServersAlt []net.IP
PollOrchestratorInterval pollInterval
}
RemoteConfig holds the info parsed from the JSON config file.
type RemoteFileConfig ¶
type RemoteFileConfig struct {
Local struct {
Location string `json:"location"`
HostName string `json:"host_name"`
SrcAddress string `json:"src_address"`
InterfaceName string `json:"interface_name"`
TargetTCPPort layers.TCPPort `json:"target_tcp_port"`
Timeout string `json:"timeout"`
BaseSrcTCPPort layers.TCPPort `json:"base_src_tcp_port"`
NumSrcTCPPorts uint16 `json:"num_src_tcp_ports"`
BatchInterval string `json:"batch_interval"`
QoSEnabled string `json:"qos"`
ResolveDNS string `json:"resolve_dns"`
DNSServersAlt string `json:"dns_servers_alternate"`
PollOrchestratorIntervalSuccess string `json:"poll_orchestrator_interval_success"`
PollOrchestratorIntervalFailure string `json:"poll_orchestrator_interval_failure"`
} `json:"local"`
Internal []target `json:"internal"`
External []target `json:"external"`
}
RemoteFileConfig needed for the JSON decoder to know which fields to expect and parse.
Source Files
¶
- config.go