Documentation ¶
Index ¶
Constants ¶
View Source
const ( NomadPlanIndexMetaKey = "__NomadPlanIndexMetaKey" RawResponse = "__RawResponse" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppResource ¶
type Config ¶
type Config struct { ServiceName string `yaml:"service_name"` Image string `yaml:"image"` Count uint `yaml:"count"` Canary uint `yaml:"count"` AutoRevert bool `yaml:"auto_revert"` AutoPromote bool `yaml:"auto_promote"` MaxParallel uint `yaml:"max_parallel"` AppFiles []AppFile `yaml:"app_files"` Entrypoint []string `yaml:"entrypoint"` Directory []Directory `yaml:"directories"` Services []ConsulService `yaml:"services"` Resources AppResource `yaml:"resources"` Constraints []MetaConstraint `yaml:"constraints"` ExtraHosts []string `yaml:"extra_hosts"` }
func (*Config) GetVersion ¶
type ConsulService ¶
type Deployer ¶
type Deployer interface { // GenerateJobSpec will merge all job into one and return // Nomad: HCL/JSON // K8S : YAML/JSON GenerateJobSpec(jobTemplateFile string, jobConfigFiles []string, workingDir string) (jobSpec *Spec, err error) // Diff show what changes will be made // The diff between current state and new desired state // Nomad: nomad plan // K8S : kubectl diff Diff(jobSpec *Spec) (diff *Spec, meta map[string]interface{}, err error) // Deploy Job. Extends var may be good for some system. Eg: Nomad will use update-index to safeguard deployment Deploy(jobSpec *Spec, extendVars map[string]interface{}) (deployResult *Spec, err error) GenerateJobSpecV1(levantJobFile string, jobCfg Config) (jobSpec *Spec, err error) }
type Directory ¶
type Directory string
func (Directory) GetBindPath ¶
func (Directory) GetHostPath ¶
type MetaConstraint ¶
type MetaConstraint string
func (MetaConstraint) GetMetaKey ¶
func (m MetaConstraint) GetMetaKey() string
func (MetaConstraint) GetValue ¶
func (m MetaConstraint) GetValue() string
type Spec ¶
type Spec struct { Content string ContentType beauter.ContentType }
Click to show internal directories.
Click to hide internal directories.