dockermonitor

package
v7.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: GPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() monitorinstance.Implementation

New returns a new docker monitor

Types

type Config

type Config struct {
	EventMetadataExtractor     MetadataExtractor
	SocketType                 string
	SocketAddress              string
	SyncAtStart                bool
	KillContainerOnPolicyError bool
	NoProxyMode                bool
}

Config is the configuration options to start a CNI monitor

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig provides a default configuration

func SetupDefaultConfig

func SetupDefaultConfig(dockerConfig *Config) *Config

SetupDefaultConfig adds defaults to a partial configuration

type Event

type Event string

Event is the type of various docker events.

const (
	// EventCreate represents the Docker "create" event.
	EventCreate Event = "create"

	// EventStart represents the Docker "start" event.
	EventStart Event = "start"

	// EventDie represents the Docker "die" event.
	EventDie Event = "die"

	// EventDestroy represents the Docker "destroy" event.
	EventDestroy Event = "destroy"

	// EventPause represents the Docker "pause" event.
	EventPause Event = "pause"

	// EventUnpause represents the Docker "unpause" event.
	EventUnpause Event = "unpause"

	// EventConnect represents the Docker "connect" event.
	EventConnect Event = "connect"

	// DockerClientVersion is the version sent out as the client
	DockerClientVersion = "v1.23"
)

type EventHandler

type EventHandler func(event *events.Message) error

A EventHandler is type of docker event handler functions.

type MetadataExtractor

type MetadataExtractor func(*types.ContainerJSON) (*policy.PURuntime, error)

A MetadataExtractor is a function used to extract a *policy.PURuntime from a given docker ContainerJSON.

func NewExternalExtractor

func NewExternalExtractor(filePath string) (MetadataExtractor, error)

NewExternalExtractor returns a new bash metadata extractor for Docker that will call the executable given in parameter and will generate a Policy Runtime as standard output The format of Input/Output of the executable are in standard JSON.

type StoredContext

type StoredContext struct {
	Tags *policy.TagStore
	// contains filtered or unexported fields
}

StoredContext is the format of the data stored in the contextstore

Jump to

Keyboard shortcuts

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