subprocess

package
Version: v0.0.0-...-d049529 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Starting     = "Starting"
	Running      = "Running"
	ShuttingDown = "ShuttingDown"
	Stopped      = "Stopped"
	Restarting   = "Restarting"
	Errored      = "Errored"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ExecutablePath       string            `mapstructure:"executable_path"`
	Args                 []string          `mapstructure:"args"`
	EnvironmentVariables map[string]string `mapstructure:"environment_variables"`
	StdInContents        string            `mapstructure:"stdin_contents"`
	RestartOnError       bool              `mapstructure:"restart_on_error"`
	RestartDelay         *time.Duration    `mapstructure:"restart_delay"`
	ShutdownTimeout      *time.Duration    `mapstructure:"shutdown_timeout"`
}

exported to be used by jmx metrics extension

type Subprocess

type Subprocess struct {
	Stdout chan string
	// contains filtered or unexported fields
}

exported to be used by jmx metrics extension

func NewSubprocess

func NewSubprocess(conf *Config, logger *zap.Logger) *Subprocess

exported to be used by jmx metrics extension

func (*Subprocess) Pid

func (subprocess *Subprocess) Pid() int

func (*Subprocess) Shutdown

func (subprocess *Subprocess) Shutdown(ctx context.Context) error

Shutdown is invoked during service shutdown.

func (*Subprocess) Start

func (subprocess *Subprocess) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto