app

package
v0.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeApp

func BeforeApp(c *cli.Context) error

BeforeApp is an action that is executed before any cli command.

func Convert

func Convert(c *cli.Context)

Convert tranforms docker compose or dab file to k8s objects

func Delete

func Delete(c *cli.Context)

Delete deletes all rc, svc.

func Ps

func Ps(c *cli.Context)

Ps lists all rc, svc.

func RandStringBytes

func RandStringBytes(n int) string

RandStringBytes generates randomly n-character string

func Scale

func Scale(c *cli.Context)

Scale scales rc.

func Up

func Up(c *cli.Context)

Up brings up rc, svc.

Types

type EnvVar

type EnvVar struct {
	Name  string
	Value string
}

EnvVar holds the environment variable struct of a container

type KomposeObject

type KomposeObject struct {
	ServiceConfigs map[string]ServiceConfig
}

KomposeObject holds the generic struct of Kompose transformation

type Ports

type Ports struct {
	HostPort      int32
	ContainerPort int32
	Protocol      Protocol
}

Ports holds the ports struct of a container

type Protocol

type Protocol string

Protocol defines network protocols supported for things like container ports.

const (
	// ProtocolTCP is the TCP protocol.
	ProtocolTCP Protocol = "TCP"
	// ProtocolUDP is the UDP protocol.
	ProtocolUDP Protocol = "UDP"
)

type ServiceConfig

type ServiceConfig struct {
	ContainerName string
	Image         string
	Environment   []EnvVar
	Port          []Ports
	Command       []string
	WorkingDir    string
	Args          []string
	Volumes       []string
	Network       []string
	Labels        map[string]string
	CPUSet        string
	CPUShares     int64
	CPUQuota      int64
	CapAdd        []string
	CapDrop       []string
	Entrypoint    []string
	Expose        []string
	Privileged    bool
	Restart       string
	User          string
}

ServiceConfig holds the basic struct of a container

Jump to

Keyboard shortcuts

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