exec

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: AGPL-3.0 Imports: 13 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachSessionResult

type AttachSessionResult struct {
	Session *sdkexec.Session `json:"session"`
	Buffer  string           `json:"buffer"`
}

type Client

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

func NewClient

func NewClient(controller Controller) *Client

func (*Client) AttachSession

func (c *Client) AttachSession(sessionID string) (AttachSessionResult, error)

func (*Client) CloseSession

func (c *Client) CloseSession(sessionID string) error

func (*Client) CreateSession

func (c *Client) CreateSession(
	plugin, connection string,
	opts sdkexec.SessionOptions,
) (*sdkexec.Session, error)

func (*Client) CreateTerminal

func (c *Client) CreateTerminal(opts CreateTerminalOptions) (*sdkexec.Session, error)

func (*Client) DetachSession

func (c *Client) DetachSession(sessionID string) (*sdkexec.Session, error)

func (*Client) GetHandler

func (c *Client) GetHandler(plugin, resource string) *sdkexec.Handler

func (*Client) GetHandlers

func (c *Client) GetHandlers() map[string]map[string]sdkexec.Handler

func (*Client) GetPluginHandlers

func (c *Client) GetPluginHandlers(plugin string) map[string]sdkexec.Handler

func (*Client) GetSession

func (c *Client) GetSession(sessionID string) (*sdkexec.Session, error)

func (*Client) ListPlugins

func (c *Client) ListPlugins() ([]string, error)

func (*Client) ListSessions

func (c *Client) ListSessions() ([]*sdkexec.Session, error)

func (*Client) ResizeSession

func (c *Client) ResizeSession(sessionID string, rows, cols uint16) error

func (*Client) WriteSession

func (c *Client) WriteSession(sessionID string, input string) error

type Controller

type Controller interface {
	internaltypes.Controller
	Run(ctx context.Context)
	GetPluginHandlers(plugin string) map[string]exec.Handler
	GetHandlers() map[string]map[string]exec.Handler
	GetHandler(plugin, resource string) *exec.Handler
	CreateSession(plugin, connectionID string, opts exec.SessionOptions) (*exec.Session, error)
	ListSessions() ([]*exec.Session, error)
	GetSession(sessionID string) (*exec.Session, error)
	AttachSession(sessionID string) (*exec.Session, []byte, error)
	DetachSession(sessionID string) (*exec.Session, error)
	WriteSession(sessionID string, data []byte) error
	CloseSession(sessionID string) error
	ResizeSession(sessionID string, rows, cols uint16) error
}

func NewController

func NewController(
	logger *zap.SugaredLogger,
	sp pkgsettings.Provider,
	resourceClient resource.IClient,
) Controller

type CreateTerminalOptions

type CreateTerminalOptions struct {
	Labels  map[string]string `json:"labels"`
	Command []string          `json:"command"`
}

Jump to

Keyboard shortcuts

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