Documentation ¶
Overview ¶
Package pkg provides common libraries for the Deis builder. The Deis builder is responsible for packaging Docker images for consumers. The builder/cli package contains command line clients for this library.
Index ¶
- Constants
- func Extract(sourcefile string) (err error)
- func GetDefaultType(bytes []byte) (string, error)
- func KillOnExit(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt)
- func ParseControllerConfig(bytes []byte) ([]string, error)
- func ParseDomain(bytes []byte) (string, error)
- func ParseReleaseVersion(bytes []byte) (int, error)
- func Run(cmd string) int
- func Sleep(c cookoo.Context, p *cookoo.Params) (interface{}, cookoo.Interrupt)
- func YamlToJSON(bytes []byte) (string, error)
- type BuildHook
- type BuildHookResponse
- type Config
- type ConfigHook
- type ProcessType
Constants ¶
const ( StatusOk = iota StatusLocalError )
Return codes that will be sent to the shell.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extract opens sourcefile and, if it has a '.gz' extension, unzips it using a gzip.Reader. then, it untars it using a tar.Reader
func GetDefaultType ¶
GetDefaultType returns the default process types given a YAML byte array.
func KillOnExit ¶
KillOnExit kills PIDs when the program exits.
Otherwise, this blocks until an os.Interrupt or os.Kill is received.
Params:
This treats Params as a map of process names (unimportant) to PIDs. It then
attempts to kill all of the pids that it receives.
func ParseControllerConfig ¶
ParseControllerConfig returns configuration key/value pair strings from a config.
func ParseDomain ¶
ParseDomain returns the domain field from the bytes of a build hook response.
func ParseReleaseVersion ¶
ParseReleaseVersion returns the version field from the bytes of a build hook response.
func Run ¶
Run starts the Builder service.
The Builder service is responsible for setting up the local container environment and then listening for new builds. The main listening service is SSH. Builder listens for new Git commands and then sends those on to Git.
Run returns on of the Status* status code constants.
func Sleep ¶
Sleep delays the execution of the remainder of the chain of commands.
Params:
-duration (time.Duration): Time to sleep. -message (string): The message to log when entering sleep.
func YamlToJSON ¶
YamlToJSON takes an input yaml string, parses it and returns a string formatted as json.
Types ¶
type BuildHook ¶
type BuildHook struct { Sha string `json:"sha"` ReceiveUser string `json:"receive_user"` ReceiveRepo string `json:"receive_repo"` Image string `json:"image"` Procfile ProcessType `json:"procfile"` Dockerfile string `json:"dockerfile"` }
BuildHook represents a controller's build-hook object.
type BuildHookResponse ¶
type BuildHookResponse struct { Release map[string]int `json:"release"` Domains []string `json:"domains"` }
BuildHookResponse represents a controller's build-hook response object.
type Config ¶
type Config struct { Owner string `json:"owner"` App string `json:"app"` Values map[string]interface{} `json:"values"` Memory map[string]string `json:"memory"` CPU map[string]int `json:"cpu"` Tags map[string]string `json:"tags"` UUID string `json:"uuid"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` }
Config represents a Deis application's configuration.
func ParseConfig ¶
ParseConfig takes a response body from the controller and returns a Config object.
type ConfigHook ¶
type ConfigHook struct { ReceiveUser string `json:"receive_user"` ReceiveRepo string `json:"receive_repo"` }
ConfigHook represents a repository from which to extract the configuration and user to use.
type ProcessType ¶
ProcessType represents the key/value mappings of a process type to a process inside a Heroku Procfile.
Directories ¶
Path | Synopsis |
---|---|
Package confd provides basic Confd support.
|
Package confd provides basic Confd support. |
Package etcd is a library for performing common Etcd tasks.
|
Package etcd is a library for performing common Etcd tasks. |
Package sshd implements an SSH server.
|
Package sshd implements an SSH server. |