Documentation
¶
Overview ¶
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func WaitSignals ¶
Types ¶
type DynamicProbeServer ¶ added in v1.0.0
func NewDynamicProbeServer ¶ added in v1.0.0
func NewDynamicProbeServer[T probe.Probe](probeManager ProbeManager[T]) *DynamicProbeServer[T]
func (*DynamicProbeServer[T]) Reload ¶ added in v1.0.0
func (s *DynamicProbeServer[T]) Reload(ctx context.Context, config []ProbeConfig) error
func (*DynamicProbeServer[T]) Start ¶ added in v1.0.0
func (s *DynamicProbeServer[T]) Start(ctx context.Context, config []ProbeConfig) error
type EventConfig ¶
type EventConfig struct {
EventSinks []EventSinkConfig `yaml:"sinks" mapstructure:"sinks" json:"sinks"`
Probes []ProbeConfig `yaml:"probes" mapstructure:"probes" json:"probes"`
}
type EventProbeManager ¶ added in v1.0.0
type EventProbeManager struct {
// contains filtered or unexported fields
}
func (*EventProbeManager) CreateProbe ¶ added in v1.0.0
func (m *EventProbeManager) CreateProbe(config ProbeConfig) (probe.EventProbe, error)
func (*EventProbeManager) StartProbe ¶ added in v1.0.0
func (m *EventProbeManager) StartProbe(ctx context.Context, p probe.EventProbe) error
func (*EventProbeManager) StopProbe ¶ added in v1.0.0
func (m *EventProbeManager) StopProbe(ctx context.Context, p probe.EventProbe) error
type EventServer ¶ added in v1.0.0
type EventServer struct {
*DynamicProbeServer[probe.EventProbe]
}
func (*EventServer) Start ¶ added in v1.0.0
func (s *EventServer) Start(ctx context.Context, probeConfig []ProbeConfig) error
type EventSinkConfig ¶ added in v1.0.0
type EventSinkConfig struct {
Name string `yaml:"name" mapstructure:"name" json:"name"`
Args interface{} `yaml:"args" mapstructure:"args" json:"args"`
}
type InspServerConfig ¶ added in v1.0.0
type InspServerConfig struct {
DebugMode bool `yaml:"debugMode" mapstructure:"debugMode" json:"debugMode"`
// A better way to set listen port is a `address` field that can be used for bind interface ip, or even unix domain socket
// Deprecated: use address instead
Port uint16 `yaml:"port" mapstructure:"port" json:"port"`
Address string `yaml:"address" mapstructure:"address" json:"address"`
EnableController bool `yaml:"enableController" mapstructure:"enableController" json:"enableController"`
ControllerAddr string `yaml:"controllerAddr" mapstructure:"controllerAddr" json:"controllerAddr"`
MetricsConfig MetricsConfig `yaml:"metrics" mapstructure:"metrics" json:"metrics"`
EventConfig EventConfig `yaml:"event" mapstructure:"event" json:"event"`
}
type MetricsConfig ¶ added in v1.0.0
type MetricsConfig struct {
Probes []ProbeConfig `yaml:"probes" mapstructure:"probes" json:"probes"`
AdditionalLabels []string `yaml:"additionalLabels" mapstructure:"additionalLabels" json:"additionalLabels"`
}
type MetricsProbeManager ¶ added in v1.0.0
type MetricsProbeManager struct {
// contains filtered or unexported fields
}
func (*MetricsProbeManager) CreateProbe ¶ added in v1.0.0
func (m *MetricsProbeManager) CreateProbe(config ProbeConfig) (probe.MetricsProbe, error)
func (*MetricsProbeManager) StartProbe ¶ added in v1.0.0
func (m *MetricsProbeManager) StartProbe(ctx context.Context, p probe.MetricsProbe) error
func (*MetricsProbeManager) StopProbe ¶ added in v1.0.0
func (m *MetricsProbeManager) StopProbe(ctx context.Context, p probe.MetricsProbe) error
type MetricsServer ¶ added in v1.0.0
type MetricsServer struct {
*DynamicProbeServer[probe.MetricsProbe]
// contains filtered or unexported fields
}
func (*MetricsServer) ServeHTTP ¶ added in v1.0.0
func (s *MetricsServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProbeConfig ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.