local

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const RunnerScript = `` /* 731-byte string literal not displayed */
View Source
const StagerScript = `` /* 144-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name       string            `yaml:"name"`
	Command    string            `yaml:"command,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   service.Services  `yaml:"services,omitempty"`
}

type Buildpack added in v0.10.0

type Buildpack struct {
	Name       string
	URL        string
	VersionURL string
}

type BuildpackList added in v0.10.0

type BuildpackList []Buildpack
var Buildpacks BuildpackList = []Buildpack{
	{
		Name:       "staticfile_buildpack",
		URL:        "https://github.com/cloudfoundry/staticfile-buildpack/releases/download/v{{.}}/staticfile-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/staticfile-buildpack/master/VERSION",
	},
	{
		Name:       "java_buildpack",
		URL:        "https://github.com/cloudfoundry/java-buildpack/releases/download/v{{.}}/java-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/java-buildpack",
	},
	{
		Name:       "ruby_buildpack",
		URL:        "https://github.com/cloudfoundry/ruby-buildpack/releases/download/v{{.}}/ruby-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/ruby-buildpack/master/VERSION",
	},
	{
		Name:       "nodejs_buildpack",
		URL:        "https://github.com/cloudfoundry/nodejs-buildpack/releases/download/v{{.}}/nodejs-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/nodejs-buildpack/master/VERSION",
	},
	{
		Name:       "go_buildpack",
		URL:        "https://github.com/cloudfoundry/go-buildpack/releases/download/v{{.}}/go-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/go-buildpack/master/VERSION",
	},
	{
		Name:       "python_buildpack",
		URL:        "https://github.com/cloudfoundry/python-buildpack/releases/download/v{{.}}/python-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/python-buildpack/master/VERSION",
	},
	{
		Name:       "php_buildpack",
		URL:        "https://github.com/cloudfoundry/php-buildpack/releases/download/v{{.}}/php-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/php-buildpack/master/VERSION",
	},
	{
		Name:       "dotnet_core_buildpack",
		URL:        "https://github.com/cloudfoundry/dotnet-core-buildpack/releases/download/v{{.}}/dotnet-core-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/dotnet-core-buildpack/master/VERSION",
	},
	{
		Name:       "binary_buildpack",
		URL:        "https://github.com/cloudfoundry/binary-buildpack/releases/download/v{{.}}/binary-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/cloudfoundry/binary-buildpack/master/VERSION",
	},
}

type Colorizer

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

type Config

type Config struct {
	Path string
}

func (*Config) Load

func (c *Config) Load() (*LocalYML, error)

func (*Config) Save

func (c *Config) Save(localYML *LocalYML) error

type Container added in v0.10.0

type Container interface {
	io.Closer
	CloseAfterStream(stream *engine.Stream) error
	Start(logPrefix string, logs io.Writer) (status int64, err error)
	Commit(ref string) (imageID string, err error)
	ExtractTo(tar io.Reader, path string) error
	CopyTo(stream engine.Stream, path string) error
	CopyFrom(path string) (engine.Stream, error)
}

type DockerEngine added in v0.10.0

type DockerEngine struct {
	Docker *docker.Client
	Exit   <-chan struct{}
}

func (*DockerEngine) NewContainer added in v0.10.0

func (d *DockerEngine) NewContainer(config *container.Config, hostConfig *container.HostConfig) (Container, error)

type Engine added in v0.10.0

type Engine interface {
	NewContainer(config *container.Config, hostConfig *container.HostConfig) (Container, error)
}

type ExportConfig

type ExportConfig struct {
	Droplet   engine.Stream
	Launcher  engine.Stream
	Ref       string
	AppConfig *AppConfig
}

type Image added in v0.10.0

type Image interface {
	Pull(image string) <-chan ui.Progress
	Build(tag string, dockerfile engine.Stream) <-chan ui.Progress
}

type LocalYML

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

type ReadResetWriter added in v0.10.0

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

type RunConfig

type RunConfig struct {
	Droplet       engine.Stream
	Launcher      engine.Stream
	SSHPass       engine.Stream
	IP            string
	Port          uint
	AppDir        string
	AppDirEmpty   bool
	Color         Colorizer
	AppConfig     *AppConfig
	ForwardConfig *service.ForwardConfig
}

type Runner

type Runner struct {
	StackVersion string
	Logs         io.Writer
	UI           UI
	Engine       Engine
	Image        Image
}

func (*Runner) Export

func (r *Runner) Export(config *ExportConfig) (imageID string, err error)

func (*Runner) Run

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

type StageConfig

type StageConfig struct {
	AppTar     io.Reader
	Cache      ReadResetWriter
	CacheEmpty bool
	Buildpack  string
	Color      Colorizer
	AppConfig  *AppConfig
}

type Stager

type Stager struct {
	DiegoVersion string
	GoVersion    string
	StackVersion string
	Logs         io.Writer
	UI           UI
	Engine       Engine
	Image        Image
	Versioner    Versioner
}

func (*Stager) Download

func (s *Stager) Download(path string) (stream engine.Stream, err error)

func (*Stager) Stage

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

type UI added in v0.7.0

type UI interface {
	Loading(message string, progress <-chan ui.Progress) error
	Output(format string, a ...interface{})
}

type Versioner added in v0.10.0

type Versioner interface {
	Build(tmplURL, versionURL string) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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