monitor

package
v6.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultMonitors

func GetDefaultMonitors(linuxProcess, linuxHost, uid, docker, cni bool) map[Type]interface{}

GetDefaultMonitors can be used as an example on how to setup configuration or use a set of defaults that work.

Types

type Config

type Config struct {
	Common    *processor.Config
	Monitors  map[Type]interface{}
	MergeTags []string
}

Config specifies the configs for monitors.

func SetupConfig

func SetupConfig(
	linuxProcessEnable bool,
	linuxProcess *linuxmonitor.Config,
	linuxHostEnable bool,
	linuxHost *linuxmonitor.Config,
	uidEnable bool,
	uid *uidmonitor.Config,
	dockerEnable bool,
	docker *dockermonitor.Config,
	cniEnable bool,
	cni *cnimonitor.Config,
	common *processor.Config,
) *Config

SetupConfig provides a complete configurations on the basis of basic inputs provided.

func (*Config) String

func (c *Config) String() string

type Monitor

type Monitor interface {

	// Start starts the monitor.
	Start() error

	// Stop Stops the monitor.
	Stop() error
}

A Monitor is an interface implmented to start/stop monitors.

func New

func New(c *Config) (Monitor, error)

New instantiates all/any combination of monitors supported.

type Type

type Type int

Type specifies the type of monitors supported.

const (
	CNI Type = iota + 1
	Docker
	LinuxProcess
	LinuxHost
	UID
)

Types supported.

Directories

Path Synopsis
cni
mock
Package mockinstance is a generated GoMock package.
Package mockinstance is a generated GoMock package.
uid
Package mockmonitor is a generated GoMock package.
Package mockmonitor is a generated GoMock package.
rpc
processor/mock
Package mockprocessor is a generated GoMock package.
Package mockprocessor is a generated GoMock package.

Jump to

Keyboard shortcuts

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