Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetControllerConfig ¶
func GetControllerConfig(st *state.State) (controller.Config, error)
GetControllerConfig gets the controller config from the given state - it's a shim so we can test the manifold without a state suite.
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency.Manifold that will run an HTTP server worker. The manifold outputs an *apiserverhttp.Mux, for other workers to register handlers against.
Types ¶
type Config ¶
type Config struct { AgentConfig agent.Config Hub *pubsub.StructuredHub Logger Logger ControllerAPIPort int UpdateControllerAPIPort func(int) error }
Config is the configuration required for running an API server worker.
type Logger ¶
type Logger interface { Debugf(string, ...interface{}) Infof(string, ...interface{}) Errorf(string, ...interface{}) }
Logger defines the methods needed for the worker to log messages.
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string HubName string StateName string Logger Logger UpdateControllerAPIPort func(int) error GetControllerConfig func(*state.State) (controller.Config, error) NewWorker func(Config) (worker.Worker, error) }
ManifoldConfig holds the information necessary to determine the controller api port and keep it up to date.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate validates the manifold configuration.
Click to show internal directories.
Click to hide internal directories.