Documentation ¶
Overview ¶
Provides global docker information.
Handler for Docker containers.
Index ¶
- Constants
- Variables
- func APIVersion() ([]int, error)
- func APIVersionString() (string, error)
- func Client() (*dclient.Client, error)
- func DetermineDeviceStorage(storageDriver StorageDriver, storageDir string, rwLayerID string) (rootfsStorageDir string, zfsFilesystem string, zfsParent string, err error)
- func FsStats(stats *info.ContainerStats, machineInfoFactory info.MachineInfoFactory, ...) error
- func Images() ([]v1.DockerImage, error)
- func Info() (*dockertypes.Info, error)
- func NewPlugin() container.Plugin
- func ParseVersion(versionString string, regex *regexp.Regexp, length int) ([]int, error)
- func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, ...) error
- func RootDir() string
- func SetTimeout(timeout time.Duration)
- func StartThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolWatcher, error)
- func StartZfsWatcher(dockerInfo *dockertypes.Info) (*zfs.ZfsWatcher, error)
- func Status() (v1.DockerStatus, error)
- func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error)
- func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
- func ValidateInfo(GetInfo func() (*dockertypes.Info, error), ...) (*dockertypes.Info, error)
- func VersionString() (string, error)
- type FsHandler
- type StorageDriver
Constants ¶
View Source
const DockerNamespace = "docker"
The namespace under which Docker aliases are unique.
Variables ¶
View Source
var ArgDockerCA = flag.String("docker-tls-ca", "ca.pem", "path to trusted CA")
View Source
var ArgDockerCert = flag.String("docker-tls-cert", "cert.pem", "path to client certificate")
View Source
var ArgDockerEndpoint = flag.String("docker", "unix:///var/run/docker.sock", "docker endpoint")
View Source
var ArgDockerKey = flag.String("docker-tls-key", "key.pem", "path to private key")
View Source
var ArgDockerTLS = flag.Bool("docker-tls", false, "use TLS to connect to docker")
View Source
var (
VersionRe = regexp.MustCompile(versionRegexpString)
)
Functions ¶
func APIVersion ¶
func APIVersionString ¶
func DetermineDeviceStorage ¶
func FsStats ¶
func FsStats( stats *info.ContainerStats, machineInfoFactory info.MachineInfoFactory, metrics container.MetricSet, storageDriver StorageDriver, fsHandler common.FsHandler, globalFsInfo fs.FsInfo, poolName string, rootfsStorageDir string, zfsParent string, ) error
func Images ¶
func Images() ([]v1.DockerImage, error)
func Info ¶
func Info() (*dockertypes.Info, error)
func NewPlugin ¶
NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin()
func ParseVersion ¶
func Register ¶
func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error
Register root container before running this function!
func SetTimeout ¶
func StartThinPoolWatcher ¶
func StartThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolWatcher, error)
func StartZfsWatcher ¶
func StartZfsWatcher(dockerInfo *dockertypes.Info) (*zfs.ZfsWatcher, error)
func Status ¶
func Status() (v1.DockerStatus, error)
func StatusFromDockerInfo ¶
func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error)
func StatusWithContext ¶
func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
func ValidateInfo ¶
func ValidateInfo(GetInfo func() (*dockertypes.Info, error), ServerVersion func() (string, error)) (*dockertypes.Info, error)
Checks whether the dockerInfo reflects a valid docker setup, and returns it if it does, or an error otherwise.
func VersionString ¶
Types ¶
type FsHandler ¶
type FsHandler struct { FsHandler common.FsHandler // thinPoolWatcher is the devicemapper thin pool watcher ThinPoolWatcher *devicemapper.ThinPoolWatcher // deviceID is the id of the container's fs device DeviceID string // zfsWatcher is the zfs filesystem watcher ZfsWatcher *zfs.ZfsWatcher // zfsFilesystem is the docker zfs filesystem ZfsFilesystem string }
FsHandler is a composite FsHandler implementation the incorporates the common fs handler, a devicemapper ThinPoolWatcher, and a zfsWatcher
type StorageDriver ¶
type StorageDriver string
const ( DevicemapperStorageDriver StorageDriver = "devicemapper" AufsStorageDriver StorageDriver = "aufs" OverlayStorageDriver StorageDriver = "overlay" Overlay2StorageDriver StorageDriver = "overlay2" ZfsStorageDriver StorageDriver = "zfs" VfsStorageDriver StorageDriver = "vfs" )
Click to show internal directories.
Click to hide internal directories.