Documentation ¶
Index ¶
- func GenerateBytesUUID() []byte
- type Composition
- func (c *Composition) Decompose(dir string) (output string, err error)
- func (c *Composition) GenerateLogs(dir, logName string) error
- func (c *Composition) GetAPIContainerForComposeService(composeService string) (apiContainer *docker.APIContainers, err error)
- func (c *Composition) GetContainerIDs(dir string) (containerIDs []string, err error)
- func (c *Composition) GetIPAddressForComposeService(composeService string) (ipAddress string, err error)
- type DockerHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBytesUUID ¶
func GenerateBytesUUID() []byte
GenerateBytesUUID returns a UUID based on RFC 4122 returning the generated bytes.
Types ¶
type Composition ¶
type Composition struct { DockerClient *docker.Client APIContainers []*docker.APIContainers ComposeFilesYaml string ProjectName string Dir string DockerHelper DockerHelper }
Composition represents a docker-compose execution and management.
func NewComposition ¶
func NewComposition(projectName, composeFilesYaml, dir string) (composition *Composition, err error)
NewComposition create a new Composition specifying the project name (for isolation) and the compose files.
func (*Composition) Decompose ¶
func (c *Composition) Decompose(dir string) (output string, err error)
Decompose decompose the composition Will also remove any containers with the same ProjectName prefix (eg. chaincode containers).
func (*Composition) GenerateLogs ¶
func (c *Composition) GenerateLogs(dir, logName string) error
GenerateLogs to file.
func (*Composition) GetAPIContainerForComposeService ¶
func (c *Composition) GetAPIContainerForComposeService( composeService string) (apiContainer *docker.APIContainers, err error)
GetAPIContainerForComposeService return the docker.APIContainers with the supplied composeService name.
func (*Composition) GetContainerIDs ¶
func (c *Composition) GetContainerIDs(dir string) (containerIDs []string, err error)
GetContainerIDs returns the container IDs for the composition (NOTE: does NOT include those defined outside composition, eg. chaincode containers).
func (*Composition) GetIPAddressForComposeService ¶
func (c *Composition) GetIPAddressForComposeService(composeService string) (ipAddress string, err error)
GetIPAddressForComposeService returns the IPAddress of the container with the supplied composeService name.
type DockerHelper ¶
DockerHelper helper for docker specific functions.
func NewDockerCmdlineHelper ¶
func NewDockerCmdlineHelper() DockerHelper
NewDockerCmdlineHelper returns a new command line DockerHelper instance.