summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-29 08:16:03 +0300
committerPaul Buetow <paul@buetow.org>2021-10-29 08:16:03 +0300
commitda05e08ad5ef57a29609397d81327c92ce848652 (patch)
treec21acd111e5bd012ff0aaa7c91f6e9d688ee9ad9 /internal/config
parentd556c13d430f291b615d538c35ebdaf9b53aa15d (diff)
parentdadbaab24d66685db0a2a6655bd75cdbb19eb929 (diff)
merge
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/args.go52
-rw-r--r--internal/config/initializer.go2
2 files changed, 27 insertions, 27 deletions
diff --git a/internal/config/args.go b/internal/config/args.go
index 3d7ac7d..859166d 100644
--- a/internal/config/args.go
+++ b/internal/config/args.go
@@ -15,31 +15,31 @@ import (
// Args is a helper struct to summarize common client arguments.
type Args struct {
lcontext.LContext
- Arguments []string
- ConfigFile string
- ConnectionsPerCPU int
- Discovery string
- LogDir string
- Logger string
- LogLevel string
- Mode omode.Mode
- NoColor bool
- PrivateKeyPathFile string
- QueryStr string
- Quiet bool
- RegexInvert bool
- RegexStr string
- Serverless bool
- ServersStr string
- Spartan bool
- SSHAuthMethods []gossh.AuthMethod
- SSHBindAddress string
- SSHHostKeyCallback gossh.HostKeyCallback
- SSHPort int
- Timeout int
- TrustAllHosts bool
- UserName string
- What string
+ Arguments []string
+ ConfigFile string
+ ConnectionsPerCPU int
+ Discovery string
+ LogDir string
+ Logger string
+ LogLevel string
+ Mode omode.Mode
+ NoColor bool
+ QueryStr string
+ Quiet bool
+ RegexInvert bool
+ RegexStr string
+ SSHAuthMethods []gossh.AuthMethod
+ SSHBindAddress string
+ SSHHostKeyCallback gossh.HostKeyCallback
+ SSHPort int
+ SSHPrivateKeyPathFile string
+ Serverless bool
+ ServersStr string
+ Spartan bool
+ Timeout int
+ TrustAllHosts bool
+ UserName string
+ What string
}
func (a *Args) String() string {
@@ -56,7 +56,6 @@ func (a *Args) String() string {
sb.WriteString(fmt.Sprintf("%s:%v,", "Logger", a.Logger))
sb.WriteString(fmt.Sprintf("%s:%v,", "Mode", a.Mode))
sb.WriteString(fmt.Sprintf("%s:%v,", "NoColor", a.NoColor))
- sb.WriteString(fmt.Sprintf("%s:%v,", "PrivateKeyPathFile", a.PrivateKeyPathFile))
sb.WriteString(fmt.Sprintf("%s:%v,", "QueryStr", a.QueryStr))
sb.WriteString(fmt.Sprintf("%s:%v,", "Quiet", a.Quiet))
sb.WriteString(fmt.Sprintf("%s:%v,", "RegexInvert", a.RegexInvert))
@@ -64,6 +63,7 @@ func (a *Args) String() string {
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHAuthMethods", a.SSHAuthMethods))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHBindAddress", a.SSHBindAddress))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHHostKeyCallback", a.SSHHostKeyCallback))
+ sb.WriteString(fmt.Sprintf("%s:%v,", "SSHPrivateKeyPathFile", a.SSHPrivateKeyPathFile))
sb.WriteString(fmt.Sprintf("%s:%v,", "SSHPort", a.SSHPort))
sb.WriteString(fmt.Sprintf("%s:%v,", "Serverless", a.Serverless))
sb.WriteString(fmt.Sprintf("%s:%v,", "ServersStr", a.ServersStr))
diff --git a/internal/config/initializer.go b/internal/config/initializer.go
index 137b831..f1f9b9b 100644
--- a/internal/config/initializer.go
+++ b/internal/config/initializer.go
@@ -80,10 +80,10 @@ func (in *initializer) transformConfig(sourceProcess source.Source, args *Args,
}
}
-// There are some special options which can be set by environment variable.
func (in *initializer) processEnvVars() {
if Env("DTAIL_INTEGRATION_TEST_RUN_MODE") {
os.Setenv("DTAIL_HOSTNAME_OVERRIDE", "integrationtest")
+ in.Server.HostKeyFile = "./ssh_host_key"
}
}