process

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildArgs

func BuildArgs(customArgs, defaultArgs Args, mergeArgs func(customArgs, defaultArgs Args) Args) []string

Types

type Args

type Args map[string][]string

func EmptyArgs

func EmptyArgs() Args

func MergeArgs

func MergeArgs(customArgs, defaultArgs Args) Args

func (Args) Set

func (a Args) Set(key string, values ...string) Args

type HealthCheck

type HealthCheck interface {
	Check(ctx context.Context) error
}

type HealthCheckFunc

type HealthCheckFunc func(ctx context.Context) error

func InsecurePollHealthCheck

func InsecurePollHealthCheck(address string) HealthCheckFunc

func (HealthCheckFunc) Check

func (f HealthCheckFunc) Check(ctx context.Context) error

type InitContext

type InitContext struct {
	TempDir string
}

type Options

type Options struct {
	MainPath     string
	BuildOptions []buildutils.BuildOption
	Command      []string

	Args     []string
	ArgsFunc func(ctx InitContext) ([]string, error)

	AttachOutput bool
	Stdout       io.Writer
	Stderr       io.Writer

	HealthTimeout time.Duration
	WaitTimeout   time.Duration

	HealthCheck HealthCheck
}

type Process

type Process struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) (*Process, error)

func (*Process) Exited

func (a *Process) Exited() (bool, error)

func (*Process) Start

func (a *Process) Start() error

func (*Process) Stop

func (a *Process) Stop() error

Jump to

Keyboard shortcuts

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