cnimonitor

package
v10.246.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerMetadataExtractor

func DockerMetadataExtractor(event *common.EventInfo) (*policy.PURuntime, error)

DockerMetadataExtractor is a systemd based metadata extractor

func KubernetesMetadataExtractor

func KubernetesMetadataExtractor(event *common.EventInfo) (*policy.PURuntime, error)

KubernetesMetadataExtractor is a systemd based metadata extractor

Types

type CniMonitor

type CniMonitor struct {
	// contains filtered or unexported fields
}

CniMonitor captures all the monitor processor information It implements the EventProcessor interface of the rpc monitor

func New

func New() *CniMonitor

New returns a new implmentation of a monitor implmentation

func (*CniMonitor) Resync

func (c *CniMonitor) Resync(ctx context.Context) error

Resync instructs the monitor to do a resync.

func (*CniMonitor) Run

func (c *CniMonitor) Run(ctx context.Context) error

Run implements Implementation interface

func (*CniMonitor) SetupConfig

func (c *CniMonitor) SetupConfig(registerer registerer.Registerer, cfg interface{}) error

SetupConfig provides a configuration to implmentations. Every implmentation can have its own config type.

func (*CniMonitor) SetupHandlers

func (c *CniMonitor) SetupHandlers(m *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

type Config

type Config struct {
	EventMetadataExtractor extractors.EventMetadataExtractor
}

Config is the configuration options to start a CNI monitor

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig provides a default configuration

func SetupDefaultConfig

func SetupDefaultConfig(cniConfig *Config) *Config

SetupDefaultConfig adds defaults to a partial configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL