defig

package
v0.0.0-...-c644d22 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearDefconfig

func ClearDefconfig()

Types

type Defconf

type Defconf struct {
	Capacitylable map[string]struct {
		Cpu string `yaml:"cpu"`
		Mem string `yaml:"mem"`
	}
	Defualtinfo struct {
		Cmdarg struct {
			Args map[string][]string `yaml:"args,omitempty"`
			Ign  map[string][]string `yaml:"ign,omitempty"`
		} `yaml:"cmdarg,omitempty"`

		Build map[string]struct {
			Cmd       string   `yaml:"cmd,omitempty"`
			Arg       string   `yaml:"arg,omitempty"`
			Config    string   `yaml:"config,omitempty"`
			Jenkignor []string `yaml:"jenkignor,omitempty"`
		} `yaml:"build,omitempty"`

		Sidecar struct {
			Neighbour map[string][]string `yaml:"neighbour,omitempty"`
			Ign       map[string][]string `yaml:"ign,omitempty"`
		} `yaml:"sidecar,omitempty"`
		Output   string              `yaml:"output,omitempty"`
		Port     string              `yaml:"port,omitempty"`
		Resource map[string][]string `yaml:"resource,omitempty"`
		// Volumes  []string
		Capacity map[string]struct {
			Capacity string `yaml:"capacity,omitempty"`
			Replica  int    `yaml:"replica,omitempty"`
			Cpu      string `yaml:"cpu,omitempty"`
			Mem      string `yaml:"mem,omitempty"`
		} `yaml:"capacity,omitempty"`
		Datacenter map[string][]string `yaml:"datacenter,omitempty"`
		Deploy     struct {
			Limited  []string `yaml:"limited,omitempty"`
			Strategy []struct {
				Flow string   `yaml:"flow,omitempty"`
				Env  []string `yaml:"env,omitempty"`
			} `yaml:"strategy,omitempty"`
		} `yaml:"deploy,omitempty"`
	}
}

func GenDefig

func GenDefig(isinstall bool, c context.Context) Defconf

var dockerpath = constset.Apppath + constset.PthSep + "repo" + constset.PthSep + "temple" + constset.PthSep

func GenDefigFrom

func GenDefigFrom(content []byte, isinstall bool, c context.Context) Defconf

func GetDefconfig

func GetDefconfig(c context.Context) Defconf

func (*Defconf) GetCapacity

func (v *Defconf) GetCapacity() []string

func (*Defconf) GetEnvKeys

func (v *Defconf) GetEnvKeys() []string

Jump to

Keyboard shortcuts

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