Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDockerMonitor ¶
func NewDockerMonitor( socketType string, socketAddress string, p monitor.ProcessingUnitsHandler, m DockerMetadataExtractor, l collector.EventCollector, syncAtStart bool, s monitor.SynchronizationHandler, killContainerOnPolicyError bool, ) monitor.Monitor
NewDockerMonitor returns a pointer to a DockerMonitor initialized with the given socketType ('tcp' or 'unix') and socketAddress (a port for 'tcp' or a socket file for 'unix').
After creating a new DockerMonitor, call addHandler to install one or more callback handlers for the events to monitor. Then call Start.
Types ¶
type DockerEvent ¶
type DockerEvent string
DockerEvent is the type of various docker events.
const ( // DockerEventCreate represents the Docker "create" event. DockerEventCreate DockerEvent = "create" // DockerEventStart represents the Docker "start" event. DockerEventStart DockerEvent = "start" // DockerEventDie represents the Docker "die" event. DockerEventDie DockerEvent = "die" // DockerEventDestroy represents the Docker "destroy" event. DockerEventDestroy DockerEvent = "destroy" // DockerEventPause represents the Docker "destroy" event. DockerEventPause DockerEvent = "pause" // DockerEventUnpause represents the Docker "destroy" event. DockerEventUnpause DockerEvent = "unpause" // DockerEventConnect represents the Docker "connect" event. DockerEventConnect DockerEvent = "connect" // DockerClientVersion is the version sent out as the client DockerClientVersion = "v1.23" )
type DockerEventHandler ¶
A DockerEventHandler is type of docker event handler functions.
type DockerMetadataExtractor ¶
type DockerMetadataExtractor func(*types.ContainerJSON) (*policy.PURuntime, error)
A DockerMetadataExtractor is a function used to extract a *policy.PURuntime from a given docker ContainerJSON.
Click to show internal directories.
Click to hide internal directories.