v2

package
v0.0.0-...-64e6891 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name       string            `yaml:"name"`
	Buildpack  string            `yaml:"buildpack,omitempty"`
	Buildpacks []string          `yaml:"buildpacks,omitempty"`
	Command    string            `yaml:"command,omitempty"`
	DiskQuota  string            `yaml:"disk_quota,omitempty"`
	Memory     string            `yaml:"memory,omitempty"`
	StagingEnv map[string]string `yaml:"staging_env,omitempty"`
	RunningEnv map[string]string `yaml:"running_env,omitempty"`
	Env        map[string]string `yaml:"env,omitempty"`
	Services   Services          `yaml:"services,omitempty"`
}

type AppYAML

type AppYAML struct {
	Applications []*AppConfig `yaml:"applications,omitempty"`
}

func (*AppYAML) Load

func (y *AppYAML) Load(path string) error

func (*AppYAML) Save

func (y *AppYAML) Save(path string) error

type Colorizer

type Colorizer func(string, ...interface{}) string

type Engine

type Engine interface {
	NewContainer(config *engine.ContainerConfig) (engine.Container, error)
}

type ExportConfig

type ExportConfig struct {
	Droplet    engine.Stream
	Stack      string
	Ref        string
	OutputDir  string
	WorkingDir string
	AppConfig  *AppConfig
}

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewExporter

func NewExporter(engine Engine) *Exporter

func (*Exporter) Export

func (e *Exporter) Export(config *ExportConfig) (imageID string, err error)

TODO: use build instead of commit

type Forward

type Forward struct {
	Name string
	From string
	To   string
}

type ForwardConfig

type ForwardConfig struct {
	AppName          string
	Stack            string
	Color            Colorizer
	Details          *ForwardDetails
	ContainerPort    string
	HostIP, HostPort string
	Wait             <-chan time.Time
}

type ForwardDetails

type ForwardDetails struct {
	Host     string
	Port     string
	User     string
	Code     func() (string, error)
	Forwards []Forward
}

type Forwarder

type Forwarder struct {
	Logs io.Writer
	// contains filtered or unexported fields
}

func NewForwarder

func NewForwarder(engine Engine) *Forwarder

func (*Forwarder) Forward

func (f *Forwarder) Forward(config *ForwardConfig) (health <-chan string, done func(), id string, err error)

type NetworkConfig

type NetworkConfig struct {
	ContainerID   string
	ContainerPort string
	HostIP        string
	HostPort      string
}

type ReadResetWriter

type ReadResetWriter interface {
	io.ReadWriter
	Reset() error
}

type RunConfig

type RunConfig struct {
	Droplet       engine.Stream
	Stack         string
	AppDir        string
	OutputDir     string
	WorkingDir    string
	Shell         bool
	Restart       <-chan time.Time
	Color         Colorizer
	AppConfig     *AppConfig
	NetworkConfig *NetworkConfig
}

type Runner

type Runner struct {
	Logs io.Writer
	TTY  engine.TTY
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(engine Engine) *Runner

func (*Runner) Run

func (r *Runner) Run(config *RunConfig) (status int64, err error)

type Service

type Service struct {
	Name           string                 `json:"name" yaml:"name"`
	Label          string                 `json:"label" yaml:"label"`
	Tags           []string               `json:"tags" yaml:"tags"`
	Plan           string                 `json:"plan" yaml:"plan"`
	Credentials    map[string]interface{} `json:"credentials" yaml:"credentials"`
	SyslogDrainURL *string                `json:"syslog_drain_url" yaml:"syslog_drain_url,omitempty"`
	Provider       *string                `json:"provider" yaml:"provider,omitempty"`
	VolumeMounts   []string               `json:"volume_mounts" yaml:"volume_mounts,omitempty"`
}

type Services

type Services map[string][]Service

type StageConfig

type StageConfig struct {
	AppTar        io.Reader
	Cache         ReadResetWriter
	CacheEmpty    bool
	BuildpackZips map[string]engine.Stream
	Stack         string
	OutputPath    string
	ForceDetect   bool
	Color         Colorizer
	AppConfig     *AppConfig
}

type Stager

type Stager struct {
	Logs io.Writer
	// contains filtered or unexported fields
}

func NewStager

func NewStager(engine Engine) *Stager

func (*Stager) Stage

func (s *Stager) Stage(config *StageConfig) (droplet engine.Stream, err error)

Jump to

Keyboard shortcuts

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