app

package
v0.0.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2016 License: Apache-2.0 Imports: 28 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultComposeFile = "docker-compose.yml"
)

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
	Annotations   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