options

package
v0.0.0-...-5b4bc19 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package options defines common options set for the guide-dog app.

Package options defines common options set for the guide-dog app.

Package options defines common options set for the guide-dog app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFormat

type ConfigFormat uint8

ConfigFormat defines the type of the config on the given path. Please check ConfigFormat* constants family for the possible values.

const (
	ConfigFormatNone ConfigFormat = iota
	ConfigFormatJSON
	ConfigFormatYAML
	ConfigFormatINI
	ConfigFormatEnvDir
)

ConfigFormat* consts family defines possible config options, supported by the guide-dog.

func (ConfigFormat) String

func (cf ConfigFormat) String() string

type Options

type Options struct {
	ConfigFormat    ConfigFormat
	ConfigPath      string
	Envs            map[string]string
	ExitCodes       map[int]bool
	GracefulTimeout time.Duration
	LockFile        *lockfile.Lock
	PathsToTrack    []string
	PTY             bool
	Signal          syscall.Signal
	Supervisor      SupervisorMode
}

Options is just a storage of the possible options with some interpretations.

func NewOptions

func NewOptions(signal string,
	envs []string,
	gracefulTimeout time.Duration,
	configFormat string,
	configPath string,
	pathsToTrack []string,
	lockFile string,
	pty bool,
	supervise bool,
	restartOnConfigChanges bool,
	exitOnCodes []string) (options *Options, err error)

NewOptions builds new Options struct based on the given parameter list

func (*Options) String

func (opt *Options) String() string

type SupervisorMode

type SupervisorMode uint8

SupervisorMode defines the mode of supervisor has to operate. Please check SupervisorMode* constants family for the possible values.

const (
	SupervisorModeNone   SupervisorMode = 0
	SupervisorModeSimple SupervisorMode = 1 << iota
	SupervisorModeRestarting
)

SupervisorMode* consts family defines possible work modes of the supervisor, supported by the guide-dog.

func (SupervisorMode) String

func (sm SupervisorMode) String() string

Jump to

Keyboard shortcuts

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