Documentation ¶
Index ¶
- type ConfigurationStruct
- func (c *ConfigurationStruct) EmptyWritablePtr() interface{}
- func (c *ConfigurationStruct) GetBootstrap() interfaces.BootstrapConfiguration
- func (c *ConfigurationStruct) GetDatabaseInfo() map[string]bootstrapConfig.Database
- func (c *ConfigurationStruct) GetLogLevel() string
- func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo
- func (c *ConfigurationStruct) UpdateFromRaw(rawConfig interface{}) bool
- func (c *ConfigurationStruct) UpdateWritableFromRaw(rawWritable interface{}) bool
- type IntervalActionInfo
- type IntervalInfo
- type WritableInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationStruct ¶
type ConfigurationStruct struct { Writable WritableInfo Clients map[string]bootstrapConfig.ClientInfo Databases map[string]bootstrapConfig.Database Logging bootstrapConfig.LoggingInfo Registry bootstrapConfig.RegistryInfo Service bootstrapConfig.ServiceInfo Intervals map[string]IntervalInfo IntervalActions map[string]IntervalActionInfo SecretStore bootstrapConfig.SecretStoreInfo Startup bootstrapConfig.StartupInfo }
Configuration V2 for the Support Scheduler Service
func (*ConfigurationStruct) EmptyWritablePtr ¶
func (c *ConfigurationStruct) EmptyWritablePtr() interface{}
EmptyWritablePtr returns a pointer to a service-specific empty WritableInfo struct. It is used by the bootstrap to provide the appropriate structure to registry.Client's WatchForChanges().
func (*ConfigurationStruct) GetBootstrap ¶
func (c *ConfigurationStruct) GetBootstrap() interfaces.BootstrapConfiguration
GetBootstrap returns the configuration elements required by the bootstrap. Currently, a copy of the configuration data is returned. This is intended to be temporary -- since ConfigurationStruct drives the configuration.toml's structure -- until we can make backwards-breaking configuration.toml changes (which would consolidate these fields into an interfaces.BootstrapConfiguration struct contained within ConfigurationStruct).
func (*ConfigurationStruct) GetDatabaseInfo ¶
func (c *ConfigurationStruct) GetDatabaseInfo() map[string]bootstrapConfig.Database
GetDatabaseInfo returns a database information map.
func (*ConfigurationStruct) GetLogLevel ¶
func (c *ConfigurationStruct) GetLogLevel() string
GetLogLevel returns the current ConfigurationStruct's log level.
func (*ConfigurationStruct) GetRegistryInfo ¶
func (c *ConfigurationStruct) GetRegistryInfo() bootstrapConfig.RegistryInfo
GetRegistryInfo returns the RegistryInfo from the ConfigurationStruct.
func (*ConfigurationStruct) UpdateFromRaw ¶
func (c *ConfigurationStruct) UpdateFromRaw(rawConfig interface{}) bool
UpdateFromRaw converts configuration received from the registry to a service-specific configuration struct which is then used to overwrite the service's existing configuration struct.
func (*ConfigurationStruct) UpdateWritableFromRaw ¶
func (c *ConfigurationStruct) UpdateWritableFromRaw(rawWritable interface{}) bool
UpdateWritableFromRaw converts configuration received from the registry to a service-specific WritableInfo struct which is then used to overwrite the service's existing configuration's WritableInfo struct.
type IntervalActionInfo ¶
type IntervalActionInfo struct { // Host is the hostname or IP address of a service. Host string // Port defines the port on which to access a given service Port int // Protocol indicates the protocol to use when accessing a given service Protocol string // Action name Name string // Action http method *const prob* Method string // Acton target name Target string // Action target parameters Parameters string // Action target API path Path string // Associated Schedule for the Event Interval string }
func (IntervalActionInfo) URL ¶
func (e IntervalActionInfo) URL() string
URI constructs a URI from the protocol, host and port and returns that as a string.
type IntervalInfo ¶
type IntervalInfo struct { // Name of the schedule must be unique? Name string // Start time in ISO 8601 format YYYYMMDD'T'HHmmss Start string // End time in ISO 8601 format YYYYMMDD'T'HHmmss End string // Periodicity of the schedule Frequency string // Cron style regular expression indicating how often the action under schedule should occur. // Use either runOnce, frequency or cron and not all. Cron string // Boolean indicating that this schedules runs one time - at the time indicated by the start RunOnce bool }