k8s

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.7.0

type Client struct {
	Path string
	// contains filtered or unexported fields
}

func NewConfig added in v1.7.0

func NewConfig(c client.Client, envid string) (*Client, error)

type ExecOutput added in v1.9.0

type ExecOutput struct {
	Stdout    string
	Stderr    string
	ExitCode  int
	Truncated bool
}

ExecOutput is what a non-interactive command wrote before it finished.

type Service

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

func New

func New(c client.Client, id string, svc *types.Service) (*Service, error)

func (*Service) Exec

func (c *Service) Exec(args []string) error

func (*Service) ExecCapture added in v1.9.0

func (c *Service) ExecCapture(ctx context.Context, args []string, maxBytes int) (ExecOutput, error)

ExecCapture runs a command in the service's pod and returns what it wrote.

This is Exec without the terminal: no stdin is attached and no TTY is requested, so it fits a caller that has one request and wants one response, such as the MCP server. Dropping the TTY also keeps stdout and stderr on separate streams, which a TTY merges.

A command that exits non-zero is not an error here: its output and exit code are the answer. An error means the exec never ran or the stream broke.

maxBytes caps each stream; zero or less means no cap. Cap what you hand to a model: `cat` on a large file otherwise fills its context with one tool result.

func (*Service) GetLogsAsString added in v1.8.0

func (c *Service) GetLogsAsString(follow bool, tail int64) (string, error)

GetLogsAsString returns logs as a string instead of printing them This is used by the MCP logs service to capture log output

func (*Service) Logs

func (c *Service) Logs(follow bool, tail int64) error

func (*Service) PortForward

func (c *Service) PortForward(ports []string) error

Jump to

Keyboard shortcuts

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