Skip to content

Commit

Permalink
Merge pull request #65 from mightyguava/yunchi/split-config
Browse files Browse the repository at this point in the history
split out config structs
  • Loading branch information
bwoskow-ld authored Jul 19, 2019
2 parents 06c6177 + d3420bc commit af85d0e
Showing 1 changed file with 32 additions and 24 deletions.
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

0 comments on commit af85d0e

Please sign in to comment.