Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Health HealthConfig `envconfig:"HEALTH"` Stream StreamConfig `envconfig:"STREAM"` }
Config represents service configurations.
func LoadConfig ¶
LoadConfig returns parsed from environment variables service configuration.
type HealthConfig ¶
type HealthConfig struct { Port int `envconfig:"PORT" default:"6061"` LiveEndpoint string `envconfig:"LIVINESS_ENDPOINT" default:"/livez"` ReadyEndpoint string `envconfig:"READINESS_ENDPOINT" default:"/ready"` Period time.Duration `envconfig:"PERIOD" default:"3s"` GracePeriod time.Duration `envconfig:"GRACE_PERIOD" default:"30s"` }
HealthConfig represents health controller configuration.
type StreamConfig ¶
type StreamConfig struct { Host string `envconfig:"HOST"` Port int `envconfig:"PORT" default:"6379"` }
StreamConfig represents stream connection configuration.
func (StreamConfig) Addr ¶
func (c StreamConfig) Addr() string
Click to show internal directories.
Click to hide internal directories.