Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split out config structs #65

Merged
merged 1 commit into from
Jul 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 32 additions & 24 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,34 +131,42 @@ func (c CommonMetricsConfig) enabled() bool {

// Config describes the configuration for a relay instance
type Config struct {
Main struct {
ExitOnError bool
IgnoreConnectionErrors bool
StreamUri string
BaseUri string
Port int
HeartbeatIntervalSecs int
}
Events events.Config
Redis struct {
Host string
Port int
Url string
LocalTtl int
}
Consul struct {
Host string
LocalTtl int
}
DynamoDB struct {
Enabled bool
TableName string
LocalTtl int
}
Main MainConfig
Events events.Config
Redis RedisConfig
Consul ConsulConfig
DynamoDB DynamoDBConfig
Environment map[string]*EnvConfig
MetricsConfig
}

type MainConfig struct {
ExitOnError bool
IgnoreConnectionErrors bool
StreamUri string
BaseUri string
Port int
HeartbeatIntervalSecs int
}

type ConsulConfig struct {
Host string
LocalTtl int
}

type RedisConfig struct {
Host string
Port int
Url string
LocalTtl int
}

type DynamoDBConfig struct {
Enabled bool
TableName string
LocalTtl int
}

type MetricsConfig struct {
Datadog DatadogConfig
Stackdriver StackdriverConfig
Expand Down