shell

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package shell implements the deployah shell command.

The command opens an interactive shell inside a running pod for a selected component, handling pod discovery, container selection, and kubectl exec wiring on behalf of the user.

Register the command with Register on a nabat.dev/nabat.App instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(app *nabat.App)

Register adds the shell command to app.

Types

type ExecuteOptions

type ExecuteOptions struct {
	// ProjectName is the Deployah project name.
	ProjectName string
	// Component is the target component name.
	Component string
	// Container selects a container when the pod has more than one.
	Container string
	// Shell is the shell binary to run inside the container.
	Shell string
	// Command runs a single command instead of an interactive shell.
	Command string
	// WorkDir is the working directory inside the container.
	WorkDir string
	// Environment limits pod selection to one environment.
	Environment string
}

ExecuteOptions configures an interactive or one-shot shell session.

type Options

type Options struct {
	Project     string `nabat:"project"`
	Component   string `nabat:"component"`
	Container   string `nabat:"container"`
	Shell       string `nabat:"shell"`
	Command     string `nabat:"command"`
	WorkDir     string `nabat:"workdir"`
	Environment string `nabat:"environment"`
}

Options holds command-line flags for shell.

type ShellExecutor

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

ShellExecutor runs kubectl exec sessions against Deployah pods.

func NewShellExecutor

func NewShellExecutor(cluster *session.Cluster, ctx *nabat.Context) (*ShellExecutor, error)

NewShellExecutor constructs a ShellExecutor from a resolved session.Cluster.

func (*ShellExecutor) Execute

func (e *ShellExecutor) Execute(opts ExecuteOptions) error

Execute runs a shell or command in the selected pod container.

Jump to

Keyboard shortcuts

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