Documentation
¶
Index ¶
- type Client
- type ExecOutput
- type Service
- func (c *Service) Exec(args []string) error
- func (c *Service) ExecCapture(ctx context.Context, args []string, maxBytes int) (ExecOutput, error)
- func (c *Service) GetLogsAsString(follow bool, tail int64) (string, error)
- func (c *Service) Logs(follow bool, tail int64) error
- func (c *Service) PortForward(ports []string) error
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
}
type ExecOutput ¶ added in v1.9.0
ExecOutput is what a non-interactive command wrote before it finished.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ExecCapture ¶ added in v1.9.0
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
GetLogsAsString returns logs as a string instead of printing them This is used by the MCP logs service to capture log output