procfile

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 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 additional settings. An example of an extended Procfile might look like:

web:
  command: ./bin/web
scheduled-job:
  command: ./bin/scheduled-job
  cron: '0/2 * * * ? *'
Attributes

Command

Specifies the command that should be run when executing this process.

command: ./bin/web

Cron

When provided, signifies that the process is a scheduled process. The value should be a valid cron expression.

cron: * * * * * * // Run once every minute

Noservice

When provided, signifies that the process is an "operational" one off command. These processes will not get any AWS resources attached to them.

This can be used to alias a common command, or by enforcing whitelisting of commands for emp run.

noservice: true

Documentation

Overview

Package procfile provides methods for parsing standard and extended Procfiles.

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"`
	Cron      *string     `yaml:"cron,omitempty"`
	NoService bool        `yaml:"noservice,omitempty"`
}

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