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
RaftOpQueue Queue
}
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
RaftOpQueue Queue
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.
type Queue ¶
type Queue interface {
// Enqueue will add an operation to the queue. As this is a blocking queue, any
// additional enqueue operations will block and wait for subsequent operations
// to be completed.
// The design of this is to ensure that people calling this will have to
// correctly handle backing off from enqueueing.
Enqueue(queue.Operation)
}
Queue is a blocking queue to guard access and to serialize raft applications, allowing for client side backoff.
Click to show internal directories.
Click to hide internal directories.