Documentation ¶
Index ¶
- func NewMonitor(opts ...Options) *config.MonitorConfig
- type DockerMonitorOption
- func SubOptionMonitorDockerDestroyStoppedContainers(f bool) DockerMonitorOption
- func SubOptionMonitorDockerExtractor(extractor extractors.DockerMetadataExtractor) DockerMonitorOption
- func SubOptionMonitorDockerFlags(syncAtStart bool) DockerMonitorOption
- func SubOptionMonitorDockerSocket(socketType, socketAddress string) DockerMonitorOption
- type Implementation
- type K8smonitorOption
- func SubOptionMonitorK8sCRIRuntimeService(criRuntimeService criapi.RuntimeService) K8smonitorOption
- func SubOptionMonitorK8sKubeconfig(kubeconfig string) K8smonitorOption
- func SubOptionMonitorK8sMetadataExtractor(extractor extractors.PodMetadataExtractor) K8smonitorOption
- func SubOptionMonitorK8sNodename(nodename string) K8smonitorOption
- type LinuxMonitorOption
- type Monitor
- type Options
- func OptionCollector(c collector.EventCollector) Options
- func OptionExternalEventSenders(evs []external.ReceiverRegistration) Options
- func OptionMergeTags(tags []string) Options
- func OptionMonitorDocker(opts ...DockerMonitorOption) Options
- func OptionMonitorK8s(opts ...K8smonitorOption) Options
- func OptionMonitorLinuxHost(opts ...LinuxMonitorOption) Options
- func OptionMonitorLinuxProcess(opts ...LinuxMonitorOption) Options
- func OptionPolicyResolver(p policy.Resolver) Options
- func OptionResyncLock(resyncLock *sync.RWMutex) Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMonitor ¶
func NewMonitor(opts ...Options) *config.MonitorConfig
NewMonitor provides a configuration for monitors.
Types ¶
type DockerMonitorOption ¶
type DockerMonitorOption func(*dockermonitor.Config)
DockerMonitorOption is provided using functional arguments.
func SubOptionMonitorDockerDestroyStoppedContainers ¶
func SubOptionMonitorDockerDestroyStoppedContainers(f bool) DockerMonitorOption
SubOptionMonitorDockerDestroyStoppedContainers sets the option to destroy stopped containers.
func SubOptionMonitorDockerExtractor ¶
func SubOptionMonitorDockerExtractor(extractor extractors.DockerMetadataExtractor) DockerMonitorOption
SubOptionMonitorDockerExtractor provides a way to specify metadata extractor for docker.
func SubOptionMonitorDockerFlags ¶
func SubOptionMonitorDockerFlags(syncAtStart bool) DockerMonitorOption
SubOptionMonitorDockerFlags provides a way to specify configuration flags info for docker.
func SubOptionMonitorDockerSocket ¶
func SubOptionMonitorDockerSocket(socketType, socketAddress string) DockerMonitorOption
SubOptionMonitorDockerSocket provides a way to specify socket info for docker.
type Implementation ¶
type Implementation interface { // Run starts the monitor implementation. Run(ctx context.Context) error // SetupConfig provides a configuration to implmentations. Every implmentation // can have its own config type. SetupConfig(registerer registerer.Registerer, cfg interface{}) error // 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 SetupHandlers(c *config.ProcessorConfig) // Resync should resynchronize PUs. This should be done while starting up. Resync(ctx context.Context) error }
Implementation for a monitor.
type K8smonitorOption ¶
type K8smonitorOption func(*k8smonitor.Config)
K8smonitorOption is provided using functional arguments.
func SubOptionMonitorK8sCRIRuntimeService ¶
func SubOptionMonitorK8sCRIRuntimeService(criRuntimeService criapi.RuntimeService) K8smonitorOption
SubOptionMonitorK8sCRIRuntimeService provides a way to pass through the CRI runtime service
func SubOptionMonitorK8sKubeconfig ¶
func SubOptionMonitorK8sKubeconfig(kubeconfig string) K8smonitorOption
SubOptionMonitorK8sKubeconfig provides a way to specify a kubeconfig to use to connect to Kubernetes. In case of an in-cluter config, leave the kubeconfig field blank
func SubOptionMonitorK8sMetadataExtractor ¶
func SubOptionMonitorK8sMetadataExtractor(extractor extractors.PodMetadataExtractor) K8smonitorOption
SubOptionMonitorK8sMetadataExtractor provides a way to specify metadata extractor for Kubernetes
func SubOptionMonitorK8sNodename ¶
func SubOptionMonitorK8sNodename(nodename string) K8smonitorOption
SubOptionMonitorK8sNodename provides a way to specify the kubernetes node name. This is useful for filtering
type LinuxMonitorOption ¶
type LinuxMonitorOption func(*linuxmonitor.Config)
LinuxMonitorOption is provided using functional arguments.
func SubOptionMonitorLinuxExtractor ¶
func SubOptionMonitorLinuxExtractor(extractor extractors.EventMetadataExtractor) LinuxMonitorOption
SubOptionMonitorLinuxExtractor provides a way to specify metadata extractor for linux monitors.
func SubOptionMonitorLinuxRealeaseAgentPath ¶
func SubOptionMonitorLinuxRealeaseAgentPath(releasePath string) LinuxMonitorOption
SubOptionMonitorLinuxRealeaseAgentPath specifies the path to release agent programmed in cgroup
type Monitor ¶
type Monitor interface { // Start starts the monitor. Run(ctx context.Context) error // UpdateConfiguration updates the configuration of the monitor UpdateConfiguration(ctx context.Context, config *config.MonitorConfig) error // Resync requests to the monitor to do a resync. Resync(ctx context.Context) error }
A Monitor is an interface implmented to start/stop monitors.
type Options ¶
type Options func(*config.MonitorConfig)
Options is provided using functional arguments.
func OptionCollector ¶
func OptionCollector(c collector.EventCollector) Options
OptionCollector provide a way to add to the monitor the collector instance
func OptionExternalEventSenders ¶
func OptionExternalEventSenders(evs []external.ReceiverRegistration) Options
OptionExternalEventSenders provide a way to add to the monitor the external event senders
func OptionMergeTags ¶
OptionMergeTags provides a way to add merge tags to be used with New().
func OptionMonitorDocker ¶
func OptionMonitorDocker(opts ...DockerMonitorOption) Options
OptionMonitorDocker provides a way to add a docker monitor and related configuration to be used with New().
func OptionMonitorK8s ¶
func OptionMonitorK8s(opts ...K8smonitorOption) Options
OptionMonitorK8s provides a way to add a K8s monitor and related configuration to be used with New().
func OptionMonitorLinuxHost ¶
func OptionMonitorLinuxHost( opts ...LinuxMonitorOption, ) Options
OptionMonitorLinuxHost provides a way to add a linux host monitor and related configuration to be used with New().
func OptionMonitorLinuxProcess ¶
func OptionMonitorLinuxProcess( opts ...LinuxMonitorOption, ) Options
OptionMonitorLinuxProcess provides a way to add a linux process monitor and related configuration to be used with New().
func OptionPolicyResolver ¶
OptionPolicyResolver provides a way to add to the monitor the policy resolver instance
func OptionResyncLock ¶
OptionResyncLock provide a shared lock between monitors if the monitor desires to sync with other components during PU resync at startup
Directories ¶
Path | Synopsis |
---|---|
api
|
|
mockexternal
Package mockexternal is a generated GoMock package.
|
Package mockexternal is a generated GoMock package. |
internal
|
|
Package mockmonitor is a generated GoMock package.
|
Package mockmonitor is a generated GoMock package. |
mockprocessor
Package mockprocessor is a generated GoMock package.
|
Package mockprocessor is a generated GoMock package. |
remoteapi
|
|
client/mockclient
Package mockclient is a generated GoMock package.
|
Package mockclient is a generated GoMock package. |