composebuilder

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApplicationDockerCompose added in v0.32.0

func GetApplicationDockerCompose(options ApplicationOptions) (*types.DockerCompose, error)

GetApplicationDockerCompose returns the docker compose for a application

func GetBuiltLocalAppDependencies added in v0.36.0

func GetBuiltLocalAppDependencies(appContext *context.AppContext) map[string]*LocalDependency

GetBuiltLocalAppDependencies returns the LocalDependency objects for application dependencies only

func GetBuiltLocalServiceDependencies added in v0.36.0

func GetBuiltLocalServiceDependencies(serviceConfig types.ServiceConfig, appContext *context.AppContext) map[string]*LocalDependency

GetBuiltLocalServiceDependencies returns the dependencies for a single service

func GetDockerComposeProjectName

func GetDockerComposeProjectName(appName string) string

GetDockerComposeProjectName creates a docker compose project name the same way docker-compose mutates the COMPOSE_PROJECT_NAME env var

func GetServiceDockerCompose added in v0.32.0

func GetServiceDockerCompose(appContext *context.AppContext, role string, mode types.BuildMode, serviceEndpoints endpoints.ServiceEndpoints) (*types.DockerCompose, error)

GetServiceDockerCompose returns the DockerConfigs for a service and its dependencies in docker-compose.yml

func GetTestDockerComposeProjectName added in v0.29.0

func GetTestDockerComposeProjectName(appName string) string

GetTestDockerComposeProjectName creates a docker compose project name for tests

func WriteYML added in v0.28.4

func WriteYML(dir, filename string, file *types.DockerCompose) error

WriteYML writes a docker-compose.yml file

Types

type ApplicationOptions added in v0.28.4

type ApplicationOptions struct {
	AppContext *context.AppContext
	BuildMode  types.BuildMode
}

ApplicationOptions are the options to

type LocalDependency added in v0.36.0

type LocalDependency struct {
	// contains filtered or unexported fields
}

LocalDependency contains methods that return config information about a local dependency

func NewLocalDependency added in v0.36.0

func NewLocalDependency(dependencyName string, dependency types.LocalDependency, appContext *context.AppContext) *LocalDependency

NewLocalDependency returns a LocalDependency

func (*LocalDependency) GetDockerConfig added in v0.36.0

func (g *LocalDependency) GetDockerConfig() (types.DockerConfig, error)

GetDockerConfig returns docker configuration and an error if any

func (*LocalDependency) GetServiceEnvVariables added in v0.36.0

func (g *LocalDependency) GetServiceEnvVariables() map[string]string

GetServiceEnvVariables returns the environment variables that need to be passed to services that use it

func (*LocalDependency) GetVolumeNames added in v0.36.0

func (g *LocalDependency) GetVolumeNames() []string

GetVolumeNames returns the named volumes used by this dependency

type ServiceComposeBuilder added in v0.32.0

type ServiceComposeBuilder struct {
	AppConfig                *types.AppConfig
	ServiceConfig            types.ServiceConfig
	Mode                     types.BuildMode
	ServiceSource            types.ServiceSource
	BuiltAppDependencies     map[string]*LocalDependency
	BuiltServiceDependencies map[string]*LocalDependency
	Role                     string
	AppDir                   string
	ServiceEndpoints         endpoints.ServiceEndpoints
}

ServiceComposeBuilder contains the docker-compose.yml config for a single service

func NewServiceComposeBuilder added in v0.32.0

func NewServiceComposeBuilder(appContext *context.AppContext, role string, mode types.BuildMode, serviceEndpoints endpoints.ServiceEndpoints) *ServiceComposeBuilder

NewServiceComposeBuilder is ServiceComposeBuilder's constructor

Jump to

Keyboard shortcuts

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