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() (*dockersystem.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 *dockersystem.Info) (*devicemapper.ThinPoolWatcher, error)
- func StartZfsWatcher(dockerInfo *dockersystem.Info) (*zfs.ZfsWatcher, error)
- func Status() (v1.DockerStatus, error)
- func StatusFromDockerInfo(dockerInfo dockersystem.Info) (v1.DockerStatus, error)
- func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
- func ValidateInfo(GetInfo func() (*dockersystem.Info, error), ...) (*dockersystem.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 ¶ added in v0.26.0
func APIVersionString ¶ added in v0.26.0
func DetermineDeviceStorage ¶ added in v0.48.0
func FsStats ¶ added in v0.48.0
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 ¶ added in v0.23.1
func Images() ([]v1.DockerImage, error)
func Info ¶ added in v0.48.0
func Info() (*dockersystem.Info, error)
func NewPlugin ¶ added in v0.34.0
NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin()
func ParseVersion ¶ added in v0.48.0
func Register ¶
func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error
Register root container before running this function!
func SetTimeout ¶ added in v0.29.0
func StartThinPoolWatcher ¶ added in v0.48.0
func StartThinPoolWatcher(dockerInfo *dockersystem.Info) (*devicemapper.ThinPoolWatcher, error)
func StartZfsWatcher ¶ added in v0.48.0
func StartZfsWatcher(dockerInfo *dockersystem.Info) (*zfs.ZfsWatcher, error)
func Status ¶ added in v0.23.1
func Status() (v1.DockerStatus, error)
func StatusFromDockerInfo ¶ added in v0.26.0
func StatusFromDockerInfo(dockerInfo dockersystem.Info) (v1.DockerStatus, error)
func StatusWithContext ¶ added in v0.29.0
func StatusWithContext(ctx context.Context) (v1.DockerStatus, error)
func ValidateInfo ¶ added in v0.23.0
func ValidateInfo(GetInfo func() (*dockersystem.Info, error), ServerVersion func() (string, error)) (*dockersystem.Info, error)
Checks whether the dockerInfo reflects a valid docker setup, and returns it if it does, or an error otherwise.
func VersionString ¶ added in v0.23.1
Types ¶
type FsHandler ¶ added in v0.48.0
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 ¶ added in v0.48.0
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.