-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.go
More file actions
19 lines (16 loc) · 786 Bytes
/
config.go
File metadata and controls
19 lines (16 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package sshd
import (
"time"
)
// Config represents the required SSH server configuration.
type Config struct {
SSHHostIP string `envconfig:"SSH_HOST_IP" default:"0.0.0.0" required:"true"`
SSHHostPort int `envconfig:"SSH_HOST_PORT" default:"2223" required:"true"`
HealthSrvPort int `envconfig:"HEALTH_SERVER_PORT" default:"8092"`
HealthSrvTestStorageRegion string `envconfig:"STORAGE_REGION" default:"us-east-1"`
CleanerPollSleepDurationSec int `envconfig:"CLEANER_POLL_SLEEP_DURATION_SEC" default:"1"`
}
// CleanerPollSleepDuration returns c.CleanerPollSleepDurationSec as a time.Duration.
func (c Config) CleanerPollSleepDuration() time.Duration {
return time.Duration(c.CleanerPollSleepDurationSec) * time.Second
}