Documentation ¶
Overview ¶
The Manager reacts to messages send to it by Notifiers. It calls all ServiceGenerators to generate new Services and passes these to ConfigGenerators which generate configuration files.
Index ¶
- func AddAnnotator(a types.Annotator)
- func AddConfigGenerator(cg types.ConfigGenerator)
- func AddNotifier(n types.Notifier)
- func AddServiceGenerator(sg types.ServiceGenerator)
- func Quit()
- func RegisterHttpHandleFunc(method, path string, handle func(w http.ResponseWriter, r *http.Request))
- func RegisterHttpHandler(method string, path string, handle http.Handler)
- func Run()
- type Config
- type Manager
- func (m *Manager) AddAnnotator(a types.Annotator) *Manager
- func (m *Manager) AddConfigGenerator(cg types.ConfigGenerator) *Manager
- func (m *Manager) AddNotifier(notifier types.Notifier) *Manager
- func (m *Manager) AddServiceGenerator(sg types.ServiceGenerator) *Manager
- func (m *Manager) Quit()
- func (m *Manager) RegisterHttpHandleFunc(method, path string, handle func(w http.ResponseWriter, r *http.Request))
- func (m *Manager) RegisterHttpHandler(method string, path string, handle http.Handler) *Manager
- func (m *Manager) Run()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddServiceGenerator ¶
func AddServiceGenerator(sg types.ServiceGenerator)
Add a ServiceGenerator
func RegisterHttpHandleFunc ¶
func RegisterHttpHandleFunc(method, path string, handle func(w http.ResponseWriter, r *http.Request))
func RegisterHttpHandler ¶
Types ¶
type Config ¶
type Config struct {
ListenAddress string `envconfig:"listen_address",default:":5678"`
}
type Manager ¶
type Manager struct { Config *Config // contains filtered or unexported fields }
Manager orchestrates Notifiers, ServiceGenerators and ConfigGenerators.
func (*Manager) AddAnnotator ¶
Add an Annotator
func (*Manager) AddConfigGenerator ¶
func (m *Manager) AddConfigGenerator(cg types.ConfigGenerator) *Manager
Add a ConfigGenerator.
func (*Manager) AddNotifier ¶
Add a Notifier.
func (*Manager) AddServiceGenerator ¶
func (m *Manager) AddServiceGenerator(sg types.ServiceGenerator) *Manager
Add a ServiceGenerator
func (*Manager) RegisterHttpHandleFunc ¶
func (*Manager) RegisterHttpHandler ¶
Register an endpoint with the HTTP server
Click to show internal directories.
Click to hide internal directories.