ephemeral

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Manage additional options for ephemeral commands (commands that are not saved to the history).

Index

Constants

View Source
const (
	DefaultEphemeralTimeoutMs       = 5000                                         // The default timeout for ephemeral commands in milliseconds.
	DefaultEphemeralTimeoutDuration = DefaultEphemeralTimeoutMs * time.Millisecond // The default timeout for ephemeral commands as a time.Duration.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EphemeralRunOpts

type EphemeralRunOpts struct {
	Env             map[string]string `json:"env,omitempty"`         // Environment variables to set for the command.
	OverrideCwd     string            `json:"overridecwd,omitempty"` // A directory to use as the current working directory. Defaults to the last set shell state.
	UsePty          bool              `json:"usepty"`                // If set, the command is run in a pseudo-terminal and all output will be written to the StdoutWriter. If not set, the command is run in a normal shell and the output is written to the StdoutWriter and StderrWriter.
	TimeoutMs       int64             `json:"timeoutms"`             // The maximum time to wait for the command to complete. If the command does not complete within this time, it is killed.
	ExpectsResponse bool              `json:"expectsresponse"`       // If set, the command is expected to return a response. If this is false, ResposeWriter is not set.
	StdoutWriter    io.WriteCloser    `json:"-"`                     // A writer to receive the command's stdout. If not set, the command's output is discarded. (set by remote.go)
	StderrWriter    io.WriteCloser    `json:"-"`                     // A writer to receive the command's stderr. If not set, the command's output is discarded. (set by remote.go)
	Canceled        atomic.Bool       `json:"canceled,omitempty"`    // If set, the command was canceled before it completed.
}

Options specific to ephemeral commands (commands that are not saved to the history)

Jump to

Keyboard shortcuts

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