subprocess

package
v0.117.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

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"`
}

Config exported to be used by jmx metric receiver.

type Subprocess

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

Subprocess exported to be used by jmx metric receiver.

func NewSubprocess

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

NewSubprocess exported to be used by jmx metric receiver.

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
y or Y : Canonical URL