Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(conf Configuration, registry configRegistry)
Run creates the configuration for the services and updates the configuration whenever a service changed
Types ¶
type CommandWriter ¶
type CommandWriter struct {
// contains filtered or unexported fields
}
CommandWriter implements the writer interface and executes pre- and post-commands
func (*CommandWriter) WriteTemplate ¶
func (c *CommandWriter) WriteTemplate(data TemplateModel) error
WriteServices transform the data with a golang template
type Configuration ¶
type Configuration struct {
Source Source
MaintenanceMode string `yaml:"maintenance-mode"`
Target string
Template string
Tag string
PreCommand string `yaml:"pre-command"`
PostCommand string `yaml:"post-command"`
Order confd.Order
IgnoreHealth bool `yaml:"ignore-health"`
}
Configuration struct for the service part of ces-confd
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) HasServiceChanged ¶
func (*Loader) ReloadServices ¶
func (l *Loader) ReloadServices()
type Service ¶
type Service struct {
Name string `json:"name"`
URL string `json:"url"`
HealthStatus string `json:"healthStatus"`
Location string `json:"location"`
Rewrite *Rewrite `json:"rewrite,omitempty"`
ProxyBuffering string `json:"proxyBuffering,omitempty"`
}
Service is a running service
type TemplateModel ¶
TemplateModel is the input for the target template
type Writer ¶
type Writer interface {
WriteTemplate(services TemplateModel) error
}
Click to show internal directories.
Click to hide internal directories.