Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { EventMetadataExtractor MetadataExtractor SocketType string SocketAddress string SyncAtStart bool KillContainerOnPolicyError bool }
Config is the configuration options to start a CNI monitor
func SetupDefaultConfig ¶
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 "destroy" event. EventPause Event = "pause" // EventUnpause represents the Docker "destroy" 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 ¶
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.
Click to show internal directories.
Click to hide internal directories.