common

package
v1.0.0-alpha.19 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StandardType = "standard"
	ExtentedType = "extended"

	WebProcessKind = "web"
	CmdProcessKind = "cmd"
	RunProcessKind = "run"
)

Variables

This section is empty.

Functions

func BuildDockerLoad

func BuildDockerLoad(target, tag string, dkr *docker.Client, r io.Reader, w io.Writer, auth *docker.AuthConfiguration) error

func GenerateId

func GenerateId(prefix string, size int) string

func GetDefaultProctype

func GetDefaultProctype(b *pb.Build) string

func GetJobID

func GetJobID(name, process_type string) string

func GetProcessCommand

func GetProcessCommand(proctype string, b *pb.Build) (command []string, err error)

func LoadEnvironment

func LoadEnvironment(data []byte) pb.Environment

func MergeAppDomains

func MergeAppDomains(domains []string, item string) []string

func ScaleApp

func ScaleApp(c *kubernetes.Clientset,
	namespace, app, image string,
	envVars map[string]string,
	enableSQLproxy bool,
	procFileData []byte,
	structure map[string]int32,
	provider cloud.CloudProvider,
) (err error)

func UpdateApp

func UpdateApp(c *kubernetes.Clientset, build *pb.Build,
	ns, image string, sqlProxy bool,
	domains []string, envVars map[string]string,
	provider cloud.CloudProvider,
	version string) error

Types

type ExtProcfile

type ExtProcfile map[string]Process

func (ExtProcfile) Command

func (ep ExtProcfile) Command(key string) (cmd []string, err error)

func (ExtProcfile) HasProcessType

func (s ExtProcfile) HasProcessType(key string) bool

func (ExtProcfile) Version

func (s ExtProcfile) Version() string

type Process

type Process struct {
	Command     interface{}       `yaml:"command"`
	Cron        *string           `yaml:"cron,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
}

type Procfile

type Procfile interface {
	Version() string
	HasProcessType(string) bool
	Command(proctype string) ([]string, error)
}

func ParseProcfile

func ParseProcfile(b []byte) (Procfile, error)

type StdProcfile

type StdProcfile map[string]string

func (StdProcfile) Command

func (s StdProcfile) Command(proctype string) ([]string, error)

func (StdProcfile) HasProcessType

func (s StdProcfile) HasProcessType(key string) bool

func (StdProcfile) Version

func (s StdProcfile) Version() string

Jump to

Keyboard shortcuts

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