proc

package
v0.0.0-...-8017ab7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Supervise

func Supervise(args []string, opts SupervisorOpts) error

Types

type Process

type Process struct {
	Command         string
	Args            []string
	StopGracePeriod time.Duration

	StopAsync context.CancelFunc
	// contains filtered or unexported fields
}

func (*Process) Restart

func (p *Process) Restart() error

func (*Process) Start

func (p *Process) Start() error

func (*Process) Stop

func (p *Process) Stop()

type Set

type Set struct {
	Path  string
	Key   string
	Value string
}

type Supervisor

type Supervisor struct {
	SupervisorOpts

	Command string
	Args    []string

	Fs afero.Fs
}

func NewSupervisor

func NewSupervisor(args []string, opts SupervisorOpts) (*Supervisor, error)

func (*Supervisor) DoSet

func (o *Supervisor) DoSet(mem map[string]string) error

func (*Supervisor) Supervise

func (sp *Supervisor) Supervise() error

type SupervisorOpts

type SupervisorOpts struct {
	RestarGracePeriod time.Duration
	WatchInterval     time.Duration
	StopGracePeriod   time.Duration
	Set               []string
	Watch             []string
	Restart           bool
}

Jump to

Keyboard shortcuts

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