model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildDefinition

type BuildDefinition struct {
	Context    string   `mapstructure:"context"`
	Dockerfile string   `mapstructure:"dockerfile"`
	BuildArgs  []string `mapstructure:"args"`
	CacheFrom  []string `mapstructure:"cache_from"`
	Tags       []string `mapstructure:"tags"`
	Labels     []string `mapstructure:"labels"`
	ShmSize    string   `mapstructure:"shm_size"`
	Target     string   `mapstructure:"target"`
}

type Config

type Config struct {
	DockerRegistry string                       `mapstructure:"docker_registry"`
	Services       map[string]ServiceDefinition `mapstructure:"services"`
	Stacks         []StackDefinition            `mapstructure:"stacks"`
}

func (*Config) GetStackByName

func (c *Config) GetStackByName(name string) *StackDefinition

type ContainerConfig

type ContainerConfig struct {
	Name    string            `mapstructure:"name"`
	AppRoot string            `mapstructure:"app_dir"`
	EnvFile string            `mapstructure:"env_file"`
	Env     map[string]string `mapstructure:"env"`
}

type ContainerDefinition

type ContainerDefinition struct {
	Name           string           `mapstructure:"name"`
	Command        []string         `mapstructure:"cmd"`
	Args           []string         `mapstructure:"args"`
	Build          *BuildDefinition `mapstructure:"build"`
	Image          string           `mapstructure:"image"`
	ExposePort     int32            `mapstructure:"port"`
	ReadinessProbe *ProbeDefinition `mapstructure:"readiness_probe"`
	LivenessProbe  *ProbeDefinition `mapstructure:"liveness_probe"`
}

type ProbeDefinition

type ProbeDefinition struct {
}

type ServiceConfig

type ServiceConfig struct {
	Ingress         []string          `mapstructure:"ingress"`
	Replicas        int32             `mapstructure:"replicas"`
	ContainerConfig []ContainerConfig `mapstructure:"containers"`
}

func (*ServiceConfig) GetContainerConfigByName

func (sc *ServiceConfig) GetContainerConfigByName(name string) *ContainerConfig

type ServiceDefinition

type ServiceDefinition struct {
	Name                    string                `mapstructure:"name"`
	Replicas                int32                 `mapstructure:"replicas"`
	MinReadySeconds         int32                 `mapstructure:"minReadySeconds"`
	ProgressDeadlineSeconds int32                 `mapstructure:"ProgressDeadlineSeconds"`
	RevisionHistoryLimit    int32                 `mapstructure:"revisionHistoryLimit"`
	MaxSurge                int32                 `mapstructure:"maxSurge"`
	MaxUnavailable          int32                 `mapstructure:"maxUnavailable"`
	Containers              []ContainerDefinition `mapstructure:"containers"`
}

type StackDefinition

type StackDefinition struct {
	Namespace   string                   `mapstructure:"name"`
	ClusterName string                   `mapstructure:"k8s_cluster_name"`
	Config      map[string]ServiceConfig `mapstructure:"services"`
}

Jump to

Keyboard shortcuts

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