Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency.Manifold that will run an apiserver worker. The manifold outputs an *apiserverhttp.Mux, for other workers to register handlers against.
func NewMetricsCollector ¶
NewMetricsCollector returns a new apiserver collector
Types ¶
type Config ¶
type Config struct { AgentConfig agent.Config Clock clock.Clock Hub *pubsub.StructuredHub Presence presence.Recorder Mux *apiserverhttp.Mux MultiwatcherFactory multiwatcher.Factory Authenticator httpcontext.LocalMacaroonAuthenticator StatePool *state.StatePool Controller *cache.Controller LeaseManager lease.Manager RegisterIntrospectionHTTPHandlers func(func(path string, _ http.Handler)) UpgradeComplete func() bool GetAuditConfig func() auditlog.Config NewServer NewServerFunc MetricsCollector *apiserver.Collector EmbeddedCommand apiserver.ExecEmbeddedCommandFunc }
Config is the configuration required for running an API server worker.
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string AuthenticatorName string ClockName string ModelCacheName string MultiwatcherName string MuxName string StateName string UpgradeGateName string AuditConfigUpdaterName string LeaseManagerName string RaftTransportName string PrometheusRegisterer prometheus.Registerer RegisterIntrospectionHTTPHandlers func(func(path string, _ http.Handler)) Hub *pubsub.StructuredHub Presence presence.Recorder NewWorker func(Config) (worker.Worker, error) NewMetricsCollector func() *apiserver.Collector }
ManifoldConfig holds the information necessary to run an apiserver worker in a dependency.Engine.
func (ManifoldConfig) Validate ¶
func (config ManifoldConfig) Validate() error
Validate validates the manifold configuration.
type NewServerFunc ¶
type NewServerFunc func(apiserver.ServerConfig) (worker.Worker, error)
NewServerFunc is the type of function that will be used by the worker to create a new API server.
Click to show internal directories.
Click to hide internal directories.