Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceConfig ¶
type ServiceConfig struct {
SimpleCustom SimpleCustomConfig
}
Example structured custom configuration types. Must be wrapped with an outer struct with single element that matches the top level custom configuration element in your configuration.toml file, 'SimpleCustom' in this example.
func (*ServiceConfig) UpdateFromRaw ¶
func (sw *ServiceConfig) UpdateFromRaw(rawConfig interface{}) bool
UpdateFromRaw updates the service's full configuration from raw data received from the Service Provider.
type SimpleCustomConfig ¶
type SimpleCustomConfig struct { OffImageLocation string OnImageLocation string Writable SimpleWritable }
SimpleCustomConfig is example of service's custom structured configuration that is specified in the service's configuration.toml file and Configuration Provider (aka Consul), if enabled.
func (*SimpleCustomConfig) Validate ¶
func (scc *SimpleCustomConfig) Validate() error
Validate ensures your custom configuration has proper values. Example of validating the sample custom configuration
type SimpleWritable ¶
type SimpleWritable struct {
DiscoverSleepDurationSecs int64
}
SimpleWritable defines the service's custom configuration writable section, i.e. can be updated from Consul