blob: 4e90f7e0c7e86b05f7dc142a74741b6304553a72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package config
// CommonConfig stores configuration keys shared by DTail server and client.
type CommonConfig struct {
// The SSH port number
SSHPort int
// SSH connection timeout in milliseconds.
SSHConnectTimeoutMs int `json:",omitempty"`
// Enable experimental features (mainly for dev purposes)
ExperimentalFeaturesEnable bool `json:",omitempty"`
// LogDir defines the log directory.
LogDir string
// Logger defines the name of the logger implementation.
Logger string
// LogLevel defines how much is logged.
LogLevel string `json:",omitempty"`
// LogRotation strategy to be used.
LogRotation string
// The cache directory
CacheDir string
}
// Create a new default configuration.
func newDefaultCommonConfig() *CommonConfig {
return &CommonConfig{
SSHPort: DefaultSSHPort,
SSHConnectTimeoutMs: 2000,
ExperimentalFeaturesEnable: false,
LogDir: "log",
Logger: "stdout",
LogLevel: DefaultLogLevel,
LogRotation: "daily",
CacheDir: "cache",
}
}
|