process

package
v0.0.0-...-1fa5987 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultShutdownGracePeriod = 5 * time.Second

Variables

This section is empty.

Functions

func GetProcessDescription

func GetProcessDescription(ctx context.Context, component api.ComponentDescription) (api.ProcessDescription, error)

Types

type Process

type Process struct {
	core.ComponentBase
	State

	SyslogPort uint
}

func (*Process) Dependencies

func (p *Process) Dependencies(ctx context.Context, input *core.DependenciesInput) (*core.DependenciesOutput, error)

func (*Process) Dispose

func (p *Process) Dispose(ctx context.Context, input *core.DisposeInput) (*core.DisposeOutput, error)

func (*Process) InitResource

func (p *Process) InitResource() error

func (*Process) Initialize

func (p *Process) Initialize(ctx context.Context, input *core.InitializeInput) (*core.InitializeOutput, error)

func (*Process) MarshalState

func (p *Process) MarshalState() (state string, err error)

func (*Process) Refresh

func (p *Process) Refresh(ctx context.Context, input *core.RefreshInput) (*core.RefreshOutput, error)

func (*Process) Restart

func (p *Process) Restart(ctx context.Context, input *core.RestartInput) (*core.RestartOutput, error)

func (*Process) Signal

func (p *Process) Signal(ctx context.Context, input *core.SignalInput) (*core.SignalOutput, error)

func (*Process) Start

func (p *Process) Start(ctx context.Context, input *core.StartInput) (*core.StartOutput, error)

func (*Process) Stop

func (p *Process) Stop(ctx context.Context, input *core.StopInput) (*core.StopOutput, error)

type Spec

type Spec struct {
	Directory                  string            `json:"directory"`
	Program                    string            `json:"program"`
	Arguments                  []string          `json:"arguments"`
	Environment                map[string]string `json:"environment"`
	ShutdownGracePeriodSeconds *int              `json:"shutdownGracePeriodSeconds"`
}

type State

type State struct {
	Directory                  string            `json:"directory"`
	Program                    string            `json:"program"`
	Arguments                  []string          `json:"arguments"`
	Environment                map[string]string `json:"environment"`
	ShutdownGracePeriodSeconds *int              `json:"shutdownGracePeriodSeconds"`

	Pgid            int               `json:"pgid"`
	SupervisorPid   int               `json:"supervisorPid"`
	Pid             int               `json:"pid"`
	FullEnvironment map[string]string `json:"fullEnvironment"`
}

Jump to

Keyboard shortcuts

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