procfile

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: BSD-2-Clause Imports: 3 Imported by: 0

README

Procfile

This is a Go library for parsing the Procfile format.

Formats

Standard

The standard Procfile format is what you're probably most familiar with, which maps a process name to the command to run. An example of a standard Procfile might look like:

web: ./bin/web
worker: ./bin/worker

The standard Procfile format is specified in https://devcenter.heroku.com/articles/procfile.

Extended

The extended Procfile format is Empire specific and implements a subset of the attributes defined in the docker-compose.yml format. The extended Procfile format gives you more control, and allows you to configure things like health checks for the individual processes. An example of an extended Procfile might look like:

web:
  command: ./bin/web
  expose:
    type: tcp
    check:
      healthy_threshold: 2
      unhealthy_threshold: 10
worker:
  command: ./bin/worker
  environment:
    DEFAULT_VAR: "var"
Attributes

Command

Specifies the command that should be run when executing this process

command: ./bin/web

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal added in v0.10.1

func Marshal(p Procfile) ([]byte, error)

Marshal marshals the Procfile to yaml format.

Types

type ExtendedProcfile added in v0.10.1

type ExtendedProcfile map[string]Process

ExtendedProcfile represents the extended Procfile format.

type Process added in v0.10.1

type Process struct {
	Command interface{} `yaml:"command"`
}

type Procfile

type Procfile interface {
	// contains filtered or unexported methods
}

Procfile is a Go representation of process configuration.

func Parse added in v0.10.1

func Parse(r io.Reader) (Procfile, error)

Parse parses the Procfile by reading from r.

func ParseProcfile

func ParseProcfile(b []byte) (Procfile, error)

ParseProcfile takes a byte slice representing a YAML Procfile and parses it into a Procfile.

type StandardProcfile added in v0.10.1

type StandardProcfile map[string]string

StandardProcfile represents a standard Procfile.

Jump to

Keyboard shortcuts

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