Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBackend ¶
NewBackend creates a new Docker backend using the given config, agent api address and CheckVars. A ConfigUpdater function can be passed to inspect/update the final docker RunConfig before creating the container for each check.
Types ¶
type ConfigUpdater ¶
ConfigUpdater allows to update the docker configuration just before the container creation.
updater := func(params backend.RunParams, rc *RunConfig) error { // If the asset type is Hostname pass an extra env variable to the container. if params.AssetType == "Hostname" { rc.ContainerConfig.Env = append(rc.ContainerConfig.Env, "FOO=BAR") } return nil }
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker implements a docker backend for running jobs if the local docker.
type Retryer ¶
Retryer represents the functions used by the docker backend for retrying docker registry operations.
type RunConfig ¶
type RunConfig struct { ContainerConfig *container.Config HostConfig *container.HostConfig NetConfig *network.NetworkingConfig ContainerStartOptions container.StartOptions }
RunConfig contains the configuration for executing a check in a container.
Click to show internal directories.
Click to hide internal directories.