Documentation ¶
Index ¶
- func CheckForRuntimes(ctx context.Context, requirements []*agentv0.Runtime) error
- func DockerRunning(ctx context.Context) bool
- func Forward(reader io.Reader, writers ...io.Writer)
- func ForwardLogs(r io.ReadCloser, ws ...io.Writer)
- func RequireExec(bins ...string) ([]string, bool)
- type CPU
- type Command
- type Docker
- func (docker *Docker) GetImage(ctx context.Context, image DockerImage) error
- func (docker *Docker) ImageExists(ctx context.Context, image DockerImage) (bool, error)
- func (docker *Docker) Init(ctx context.Context, image DockerImage) error
- func (docker *Docker) Run(ctx context.Context, cmds ...*Command) error
- func (docker *Docker) Silence()
- func (docker *Docker) Start(ctx context.Context) error
- func (docker *Docker) StartWithCommand(ctx context.Context, cmd *Command) error
- func (docker *Docker) Stop() error
- func (docker *Docker) WithCommand(cmd ...string)
- func (docker *Docker) WithEnvironmentVariables(envs ...string)
- func (docker *Docker) WithPort(port DockerPort)
- type DockerContainerInstance
- type DockerImage
- type DockerOption
- type DockerPort
- type DockerRunOption
- type Event
- type Memory
- type ProcessState
- type Runner
- type RunnerEvent
- type Tracked
- type TrackedProcess
- type WrappedCmd
- type WrappedCmdOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForRuntimes ¶ added in v0.1.6
func DockerRunning ¶ added in v0.1.1
func ForwardLogs ¶
func ForwardLogs(r io.ReadCloser, ws ...io.Writer)
func RequireExec ¶ added in v0.0.75
Types ¶
type Command ¶ added in v0.0.87
type Command struct {
// contains filtered or unexported fields
}
func NewCommand ¶ added in v0.0.90
type Docker ¶ added in v0.0.87
type Docker struct {
// contains filtered or unexported fields
}
func NewDocker ¶ added in v0.0.87
func NewDocker(ctx context.Context, opts ...DockerOption) (*Docker, error)
NewDocker creates a new docker runner
func (*Docker) GetImage ¶ added in v0.0.87
func (docker *Docker) GetImage(ctx context.Context, image DockerImage) error
func (*Docker) ImageExists ¶ added in v0.0.87
func (*Docker) Init ¶ added in v0.0.87
func (docker *Docker) Init(ctx context.Context, image DockerImage) error
func (*Docker) StartWithCommand ¶ added in v0.1.6
func (*Docker) WithCommand ¶ added in v0.1.6
func (*Docker) WithEnvironmentVariables ¶ added in v0.1.6
func (*Docker) WithPort ¶ added in v0.1.6
func (docker *Docker) WithPort(port DockerPort)
type DockerContainerInstance ¶ added in v0.0.87
type DockerContainerInstance struct {
// contains filtered or unexported fields
}
type DockerImage ¶
func (*DockerImage) Image ¶
func (image *DockerImage) Image() string
type DockerOption ¶
type DockerOption func(option *DockerRunOption)
func WithCustomExec ¶ added in v0.1.6
func WithCustomExec() DockerOption
func WithWorkspace ¶ added in v0.0.87
func WithWorkspace(location string) DockerOption
type DockerPort ¶ added in v0.0.91
type DockerRunOption ¶ added in v0.0.87
type Event ¶ added in v0.0.71
type Event struct { // Err is the state of error of the service Err error // Status is the state of the service ProcessState // CPU *observabilityv0.CPU // Memory *observabilityv0.Memory }
Event represents data of a **running** service Generic so most fields will be nil
type ProcessState ¶ added in v0.0.71
type ProcessState int
const ( Unknown ProcessState = iota NotFound ProcessState = iota Running InterruptibleSleep UninterruptibleSleep Stopped Zombie Dead TracingStop Idle Parked Waking )
func (ProcessState) String ¶ added in v0.0.71
func (ps ProcessState) String() string
type Runner ¶
type RunnerEvent ¶ added in v0.0.75
type TrackedProcess ¶ added in v0.0.71
func (*TrackedProcess) GetCPU ¶ added in v0.0.71
func (p *TrackedProcess) GetCPU(ctx context.Context) (*CPU, error)
func (*TrackedProcess) GetMemory ¶ added in v0.0.71
func (p *TrackedProcess) GetMemory(ctx context.Context) (*Memory, error)
func (*TrackedProcess) GetState ¶ added in v0.0.71
func (p *TrackedProcess) GetState(ctx context.Context) (ProcessState, error)
type WrappedCmd ¶ added in v0.0.75
type WrappedCmd struct {
// contains filtered or unexported fields
}
func NewWrappedCmd ¶ added in v0.0.75
func (*WrappedCmd) Run ¶ added in v0.0.85
func (run *WrappedCmd) Run() error
func (*WrappedCmd) Start ¶ added in v0.0.75
func (run *WrappedCmd) Start(ctx context.Context) (*WrappedCmdOutput, error)
type WrappedCmdOutput ¶ added in v0.0.75
type WrappedCmdOutput struct { PID int Events chan RunnerEvent }
Click to show internal directories.
Click to hide internal directories.