local

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 22 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 ForwardScript = `` /* 521-byte string literal not displayed */
View Source
const RunnerScript = `` /* 504-byte string literal not displayed */
View Source
const StagerScript = `` /* 228-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"`
	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   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/sclevine/cflocal-data/master/versions/staticfile-buildpack",
	},
	{
		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/sclevine/cflocal-data/master/versions/ruby-buildpack",
	},
	{
		Name:       "nodejs_buildpack",
		URL:        "https://github.com/cloudfoundry/nodejs-buildpack/releases/download/v{{.}}/nodejs-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/nodejs-buildpack",
	},
	{
		Name:       "go_buildpack",
		URL:        "https://github.com/cloudfoundry/go-buildpack/releases/download/v{{.}}/go-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/go-buildpack",
	},
	{
		Name:       "python_buildpack",
		URL:        "https://github.com/cloudfoundry/python-buildpack/releases/download/v{{.}}/python-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/python-buildpack",
	},
	{
		Name:       "php_buildpack",
		URL:        "https://github.com/cloudfoundry/php-buildpack/releases/download/v{{.}}/php-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/php-buildpack",
	},
	{
		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/sclevine/cflocal-data/master/versions/dotnet-core-buildpack",
	},
	{
		Name:       "binary_buildpack",
		URL:        "https://github.com/cloudfoundry/binary-buildpack/releases/download/v{{.}}/binary-buildpack-v{{.}}.zip",
		VersionURL: "https://raw.githubusercontent.com/sclevine/cflocal-data/master/versions/binary-buildpack",
	},
}

TODO: merge the version URLs into a single JSON file with download URLs

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
	ID() string
	CloseAfterStream(stream *engine.Stream) error
	Background() error
	Start(logPrefix string, logs io.Writer, restart <-chan time.Time) (status int64, err error)
	HealthCheck() <-chan string
	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 ForwardConfig added in v0.14.0

type ForwardConfig struct {
	AppName          string
	SSHPass          engine.Stream
	Color            Colorizer
	ForwardConfig    *service.ForwardConfig
	HostIP, HostPort string
	Wait             <-chan time.Time
}

type Forwarder

type Forwarder struct {
	StackVersion string
	Logs         io.Writer
	Exit         <-chan struct{}
	Engine       Engine
}

func (*Forwarder) Forward added in v0.14.0

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

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 NetworkConfig added in v0.14.0

type NetworkConfig struct {
	ContainerID string
	HostIP      string
	HostPort    string
}

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
	AppDir        string
	RSync         bool
	Restart       <-chan time.Time
	Color         Colorizer
	AppConfig     *AppConfig
	NetworkConfig *NetworkConfig
}

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
	AppDir     string
	RSync      bool
	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