package watcher

import "github.com/google/cadvisor/manager/watcher"

Package container defines types for sub-container events and also defines an interface for container operation handlers.

Index

Types

type ContainerEvent

type ContainerEvent struct {
	// The type of event that occurred.
	EventType ContainerEventType

	// The full container name of the container where the event occurred.
	Name string

	// The watcher that detected this change event
	WatchSource ContainerWatchSource
}

ContainerEvent represents a

type ContainerEventType

type ContainerEventType int

SubcontainerEventType indicates an addition or deletion event.

const (
	ContainerAdd ContainerEventType = iota
	ContainerDelete
)

type ContainerWatchSource

type ContainerWatchSource int
const (
	Raw ContainerWatchSource = iota
	Rkt
)

type ContainerWatcher

type ContainerWatcher interface {
	// Registers a channel to listen for events affecting subcontainers (recursively).
	Start(events chan ContainerEvent) error

	// Stops watching for subcontainer changes.
	Stop() error
}

Source Files

watcher.go

Directories

PathSynopsis
manager/watcher/rawPackage container defines types for sub-container events and also defines an interface for container operation handlers.
manager/watcher/rktPackage rkt implements the watcher interface for rkt
Version
v0.32.0
Published
Nov 12, 2018
Platform
darwin/amd64
Last checked
17 hours ago

Tools for package owners.