docker

package
v6.0.0-rc1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2017 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package docker is a Metricbeat module that contains MetricSets.

Index

Constants

This section is empty.

Variables

View Source
var HostParser = parse.URLHostParserBuilder{DefaultScheme: "tcp"}.Build()

Functions

func DeDotLabels

func DeDotLabels(labels map[string]string) common.MapStr

DeDotLabels returns a new common.MapStr containing a copy of the labels where the dots in each label name have been changed to an underscore.

func ExtractContainerName

func ExtractContainerName(names []string) string

func NewDockerClient

func NewDockerClient(endpoint string, config Config) (*docker.Client, error)

func NewModule

func NewModule(base mb.BaseModule) (mb.Module, error)

Types

type Config

type Config struct {
	TLS *TLSConfig `config:"ssl"`
}

type Container

type Container struct {
	ID     string
	Name   string
	Labels common.MapStr
}

func NewContainer

func NewContainer(container *docker.APIContainers) *Container

func (*Container) ToMapStr

func (c *Container) ToMapStr() common.MapStr

type Stat

type Stat struct {
	Container docker.APIContainers
	Stats     docker.Stats
}

func FetchStats

func FetchStats(client *docker.Client, timeout time.Duration) ([]Stat, error)

FetchStats returns a list of running containers with all related stats inside

type TLSConfig

type TLSConfig struct {
	Enabled     *bool  `config:"enabled"`
	CA          string `config:"certificate_authority"`
	Certificate string `config:"certificate"`
	Key         string `config:"key"`
}

func (*TLSConfig) IsEnabled

func (c *TLSConfig) IsEnabled() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL