package
0.0.0-20180320180355-dc5648ea2297
Repository: https://github.com/grammarly/rocker-compose.git
Documentation: pkg.go.dev

# Packages

Package ansible is providing data structures and functions for responses when rocker-compose is running in ansible mode (rocker-compose run --ansible).
Package config holds functionality for processing compose.yml manifests, templating, converting manifests to docker api run spec and comparing them against each other.
No description provided by the author

# Functions

GetBridgeIP gets the ip address of docker network bridge it is useful when you want to loose couple containers and not have tightly link them container A may publish port 8125 to host network and container B may access this port through a bridge ip address; it's a hacky solution, any better way to obtain bridge ip without ssh access to host machine is welcome Here we create a dummy container and look at .NetworkSettings.Gateway value TODO: maybe we don't need this anymore since docker 1.8 seem to specify all existing containers in a /etc/hosts file of every contianer.
GetContainersFromConfig returns the list of Container objects from a spec Config object.
New makes a new Compose object.
NewClient makes a new DockerClient object based on configuration params that is given with input DockerClient object.
NewContainerFormatter returns an object that is given to logrus to better format contaienr output.
NewContainerFromConfig makes a single Container object from a spec Config object.
NewContainerFromDocker converts a container object given by docker client to a local Container object.
NewContainerIo makes ContainerIo objects and initializes formatters for container's stdout and stderr streams.
NewDiff returns an implementation of Diff object.
NewDockerClientRunner makes a runner that uses a DockerClient for executing actions.
NewDryRunner makes a runner that does not actually execute actions, but prints them.
NewEnsureContainerExistAction makes action that ensures that container exists.
NewEnsureContainerStateAction makes action that ensures that container state is a desired one.
NewRemoveContainerAction makes action that removes a container.
NewRunContainerAction makes action that runs a container.
NewStepAction makes a "step" wrapper which holds the list of actions that may run in parallel.
NewWaitContainerAction makes action that waits for container.
PullDockerImage pulls an image and streams to a logger respecting terminal features.
WalkActions recursively though all action and applies given function to every action.

# Variables

NoAction is an empty action which does nothing.

# Structs

Compose is the main object that executes actions and holds runtime information.
Config is a configuration object which is passed to compose.New() for creating the new Compose instance.
Container object represents a single container produced by a rocker-compose spec.
ContainerIo initializes and maintains container I/O and also owns 'done' channel that can be used by other actors.
ContainerState represents the state of a container.
DockerClient is an implementation of Client interface that do operations to a given docker client.
ErrContainerBadState is an error that describes state inconsistency that can be checked by EnsureContainerState function.

# Interfaces

Action interface describes action that can be done by rocker-compose docker client.
Client interface describes a rocker-compose client that can do various operations needed for rocker-compose to make changes.
Diff describes a comparison functionality of two container sets: expected and actual 'expected' is a list of containers from a spec (compose.yml) 'actual' is a list of existing containers in a docker daemon The Diff function should return the action list that is needed to transition form the 'actual' state to the 'expected' one.
Runner interface describes a runnable facade which executes given list of actions.