Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIntrospectionSocketName ¶
func DefaultIntrospectionSocketName(entityTag names.Tag) string
DefaultIntrospectionSocketName returns the socket name to use for the abstract domain socket that the introspection worker serves requests over.
func NewPrometheusRegistry ¶
func NewPrometheusRegistry() (*prometheus.Registry, error)
NewPrometheusRegistry returns a new prometheus.Registry with the Go and process metric collectors registered. This registry is exposed by the introspection abstract domain socket on all Linux agents.
func StartIntrospection ¶
func StartIntrospection(cfg IntrospectionConfig) error
StartIntrospection creates the introspection worker. It cannot and should not be in the engine itself as it reports on the engine, and other aspects of the runtime. If we put it in the engine, then it is mostly likely shut down in the times we need it most, which is when the agent is having problems shutting down. Here we effectively start the worker and tie its life to that of the engine that is returned.
Types ¶
type IntrospectionConfig ¶
type IntrospectionConfig struct { Agent agent.Agent Engine *dependency.Engine StatePoolReporter introspection.Reporter PubSubReporter introspection.Reporter MachineLock machinelock.Lock PrometheusGatherer prometheus.Gatherer PresenceRecorder presence.Recorder Clock clock.Clock LocalHub *pubsub.SimpleHub CentralHub *pubsub.StructuredHub LeaseFSM *raftlease.FSM NewSocketName func(names.Tag) string WorkerFunc func(config introspection.Config) (worker.Worker, error) }
IntrospectionConfig defines the various components that the introspection worker reports on or needs to start up.