winpty

package
v0.64.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	PowerShellCommandFlag = "-Command"
)

Variables

View Source
var (
	ErrEmptyEnvironment = errors.New("empty environment")
)

Functions

func ExecutePtyWithUserToken

func ExecutePtyWithUserToken(ctx context.Context, session ssh.Session, ptyConfig PtyConfig, userConfig UserConfig) error

ExecutePtyWithUserToken executes a command with ConPty using user token.

Types

type ExecutionConfig

type ExecutionConfig struct {
	Pty     PtyConfig
	User    UserConfig
	Session ssh.Session
	Context context.Context
}

ExecutionConfig holds all execution configuration.

type PtyConfig

type PtyConfig struct {
	Shell      string
	Command    string
	Width      int
	Height     int
	WorkingDir string
}

PtyConfig holds configuration for Pty execution.

type SessionExiter

type SessionExiter interface {
	Exit(code int) error
}

SessionExiter provides the Exit method for reporting process exit status.

type UserConfig

type UserConfig struct {
	Token       windows.Handle
	Environment []string
}

UserConfig holds user execution configuration.

Jump to

Keyboard shortcuts

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