Documentation ¶
Index ¶
- type Config
- type K8sMonitor
- func (m *K8sMonitor) Event(ctx context.Context, ev common.Event, data interface{}) error
- func (m *K8sMonitor) Resync(ctx context.Context) error
- func (m *K8sMonitor) Run(ctx context.Context) error
- func (m *K8sMonitor) SenderReady()
- func (m *K8sMonitor) SetupConfig(_ registerer.Registerer, cfg interface{}) error
- func (m *K8sMonitor) SetupHandlers(c *config.ProcessorConfig)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Kubeconfig string Nodename string CRIRuntimeService criapi.RuntimeService MetadataExtractor extractors.PodMetadataExtractor }
Config is the config for the Kubernetes monitor
func SetupDefaultConfig ¶
SetupDefaultConfig adds defaults to a partial configuration
type K8sMonitor ¶
type K8sMonitor struct {
// contains filtered or unexported fields
}
K8sMonitor is the monitor for Kubernetes.
func (*K8sMonitor) Event ¶
Event will receive event `data` for processing a common.Event in the monitor. The sent data is implementation specific - therefore it has no type in the interface. If the sent data is of an unexpected type, its implementor must return an error indicating so.
func (*K8sMonitor) Resync ¶
func (m *K8sMonitor) Resync(ctx context.Context) error
Resync should resynchronize PUs. This should be done while starting up.
func (*K8sMonitor) Run ¶
func (m *K8sMonitor) Run(ctx context.Context) error
Run starts the monitor implementation.
func (*K8sMonitor) SenderReady ¶
func (m *K8sMonitor) SenderReady()
SenderReady will be called by the sender to notify the receiver that the sender is now ready to send events.
func (*K8sMonitor) SetupConfig ¶
func (m *K8sMonitor) SetupConfig(_ registerer.Registerer, cfg interface{}) error
SetupConfig provides a configuration to implmentations. Every implmentation can have its own config type.
func (*K8sMonitor) SetupHandlers ¶
func (m *K8sMonitor) SetupHandlers(c *config.ProcessorConfig)
SetupHandlers sets up handlers for monitors to invoke for various events such as processing unit events and synchronization events. This will be called before Start() by the consumer of the monitor