config

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterImageStorage added in v0.6.0

type ClusterImageStorage struct {
	Docker         *struct{}
	DockerRegistry *DockerRegistryClusterImageStorage
}

type Config

type Config struct {
	// All Kubernetes resources are named with "-"+EnvironmentID as a suffix,
	// and have an additional label "env="+EnvironmentID so that namespaces can be shared.
	EnvironmentID       string
	EnvironmentLabel    string
	KubeConfig          *rest.Config
	Namespace           string
	ClusterImageStorage ClusterImageStorage
	VolumeInitBaseImage *string

	Services map[string]*Service
}

func New

func New(files []string) (*Config, error)

func (*Config) AddService

func (cfg *Config) AddService(dockerComposeService *dockerComposeConfig.Service) *Service

AddService adds a service to this configuration.

func (*Config) AddToFilter

func (cfg *Config) AddToFilter(service *Service)

AddToFilter adds service and its (in)direct dependencies (based on depends_on) to the set of services matched by the current filter. After a AddToFilter(service), MatchesFilterDirectly(service) will return true unless ClearFilter was called.

func (*Config) ClearFilter

func (cfg *Config) ClearFilter()

ClearFilter sets the current filter to match no service.

func (*Config) MatchesFilter

func (cfg *Config) MatchesFilter(service *Service) bool

MatchesFilter determines whether a service matches the current filter (indirectly or directly).

func (*Config) MatchesFilterDirectly added in v0.6.3

func (cfg *Config) MatchesFilterDirectly(service *Service) bool

MatchesFilterDirectly determines whether a service matches the current filter directly (e.g. service was passed to AddToFilter).

type DockerRegistryClusterImageStorage added in v0.6.0

type DockerRegistryClusterImageStorage struct {
	Host string
}

type Port

type Port struct {
	Port int32
	// one of "udp", "tcp" and "sctp"
	Protocol string
}

type Service

type Service struct {
	DockerComposeService *dockerComposeConfig.Service

	NameEscaped string
	Ports       []Port
	// contains filtered or unexported fields
}

func (*Service) Name

func (s *Service) Name() string

Jump to

Keyboard shortcuts

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