compose

package
v0.0.0-...-168b963 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package compose reads docker-compose yaml files and generates architecture json output Would use https://github.com/docker/libcompose if it wasn't so mind-numbingly complicated

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeArch

func ComposeArch(name string, c *ComposeV2Yaml)

ComposeArch makes an architecture from a compose V2 yaml format

Types

type ComposeAttributes

type ComposeAttributes struct {
	Build    string   `yaml:"build,omitempty"`
	Image    string   `yaml:"image,omitempty"`
	Links    []string `yaml:"links,omitempty"`
	Volumes  []string `yaml:"volumes,omitempty"`
	Ports    []string `yaml:"ports,omitempty"`
	Networks []string `yaml:"networks,omitempty"`
}

ComposeAttributes V1 maps to attributes of a microservice

type ComposeServices

type ComposeServices map[string]ComposeAttributes

ComposeServices type to extract interesting data from compose yaml version 1 file

func ReadCompose

func ReadCompose(fn string) ComposeServices

ReadCompose unmarshalls services from a yaml file

type ComposeV2Yaml

type ComposeV2Yaml struct {
	Version  string                 `yaml:"2,omitempty"`
	Services ComposeServices        `yaml:"services,omitempty"`
	Networks map[string]interface{} `yaml:"networks,omitempty"`
	Volumes  map[string]interface{} `yaml:"volumes,omitempty"`
}

ComposeV2Yaml type to extract interesting data from compose yaml version 2 file

func ReadComposeV2

func ReadComposeV2(fn string) *ComposeV2Yaml

ReadComposeV2 unmarshalls services from a compose V2 yaml file

Jump to

Keyboard shortcuts

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