app_runner

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppEnvironmentParams

type AppEnvironmentParams struct {
	EnvironmentVariables map[string]string
	Privileged           bool
	User                 string
	Monitor              MonitorConfig
	Instances            int
	CPUWeight            uint
	MemoryMB             int
	DiskMB               int
	ExposedPorts         []uint16
	WorkingDir           string
	RouteOverrides       RouteOverrides
	TcpRoutes            TcpRoutes
	NoRoutes             bool
}

type AppRunner

type AppRunner interface {
	CreateApp(params CreateAppParams) error
	SubmitLrp(lrpJSON []byte) (string, error)
	ScaleApp(name string, instances int) error
	UpdateAppRoutes(name string, routes RouteOverrides) error
	UpdateApp(updateAppParams UpdateAppParams) error
	RemoveApp(name string) error
}

func New

func New(receptorClient receptor.Client, systemDomain string, keygen KeyGenerator) AppRunner

type CreateAppParams

type CreateAppParams struct {
	AppEnvironmentParams

	Name         string
	StartCommand string
	RootFS       string
	AppArgs      []string
	Timeout      time.Duration
	Annotation   string
	Setup        models.Action
}

type KeyGenerator

type KeyGenerator interface {
	GenerateRSAPrivateKey(bits int) (pemEncodedPrivateKey string, err error)
	GenerateRSAKeyPair(bits int) (pemEncodedPrivateKey string, authorizedKey string, err error)
}

type MonitorConfig

type MonitorConfig struct {
	Method            MonitorMethod
	URI               string
	Port              uint16
	Timeout           time.Duration
	CustomCommand     string
	CustomCommandArgs []string
}

type MonitorMethod

type MonitorMethod int
const (
	NoMonitor MonitorMethod = iota
	PortMonitor
	URLMonitor
	CustomMonitor

	AttemptedToCreateLatticeDebugErrorMessage = reserved_app_ids.LatticeDebugLogStreamAppId + " is a reserved app name. It is used internally to stream debug logs for lattice components."
)

type RouteOverride

type RouteOverride struct {
	HostnamePrefix string
	Port           uint16
}

type RouteOverrides

type RouteOverrides []RouteOverride

type TcpRoute

type TcpRoute struct {
	ExternalPort uint16
	Port         uint16
}

type TcpRoutes

type TcpRoutes []TcpRoute

type UpdateAppParams

type UpdateAppParams struct {
	Name           string
	RouteOverrides RouteOverrides
	TcpRoutes      TcpRoutes
	NoRoutes       bool
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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