Documentation
¶
Index ¶
- type AdapterV1
- func (a *AdapterV1) AttachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, []byte, error)
- func (a *AdapterV1) Close()
- func (a *AdapterV1) CloseSession(ctx *types.PluginContext, sessionID string) error
- func (a *AdapterV1) CreateSession(ctx *types.PluginContext, opts exec.SessionOptions) (*exec.Session, error)
- func (a *AdapterV1) DetachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)
- func (a *AdapterV1) GetSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)
- func (a *AdapterV1) GetSupportedResources(ctx *types.PluginContext) []exec.Handler
- func (a *AdapterV1) ListSessions(ctx *types.PluginContext) ([]*exec.Session, error)
- func (a *AdapterV1) ResizeSession(ctx *types.PluginContext, sessionID string, cols, rows int32) error
- func (a *AdapterV1) Stream(ctx context.Context, in chan exec.StreamInput) (chan exec.StreamOutput, error)
- type AttachSessionResult
- type Client
- func (c *Client) AttachSession(sessionID string) (AttachSessionResult, error)
- func (c *Client) CloseSession(sessionID string) error
- func (c *Client) CreateSession(plugin, connection string, opts sdkexec.SessionOptions) (*sdkexec.Session, error)
- func (c *Client) CreateTerminal(opts CreateTerminalOptions) (*sdkexec.Session, error)
- func (c *Client) DetachSession(sessionID string) (*sdkexec.Session, error)
- func (c *Client) GetHandler(plugin, resource string) *sdkexec.Handler
- func (c *Client) GetHandlers() map[string]map[string]sdkexec.Handler
- func (c *Client) GetPluginHandlers(plugin string) map[string]sdkexec.Handler
- func (c *Client) GetSession(sessionID string) (*sdkexec.Session, error)
- func (c *Client) ListPlugins() ([]string, error)
- func (c *Client) ListSessions() ([]*sdkexec.Session, error)
- func (c *Client) ResizeSession(sessionID string, rows, cols uint16) error
- func (c *Client) WriteSession(sessionID string, input string) error
- type Controller
- type CreateTerminalOptions
- type ExecProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterV1 ¶ added in v0.2.0
type AdapterV1 struct {
// contains filtered or unexported fields
}
AdapterV1 wraps SDK v1 exec.Provider as the engine canonical ExecProvider. For v1, all methods are direct delegation (types identical). When v2 ships and canonical types diverge, AdapterV1 translates v1 → canonical.
func NewAdapterV1 ¶ added in v0.2.0
NewAdapterV1 creates a new v1 adapter wrapping the given SDK exec provider.
func (*AdapterV1) AttachSession ¶ added in v0.2.0
func (*AdapterV1) CloseSession ¶ added in v0.2.0
func (a *AdapterV1) CloseSession(ctx *types.PluginContext, sessionID string) error
func (*AdapterV1) CreateSession ¶ added in v0.2.0
func (a *AdapterV1) CreateSession(ctx *types.PluginContext, opts exec.SessionOptions) (*exec.Session, error)
func (*AdapterV1) DetachSession ¶ added in v0.2.0
func (*AdapterV1) GetSession ¶ added in v0.2.0
func (*AdapterV1) GetSupportedResources ¶ added in v0.2.0
func (a *AdapterV1) GetSupportedResources(ctx *types.PluginContext) []exec.Handler
func (*AdapterV1) ListSessions ¶ added in v0.2.0
func (*AdapterV1) ResizeSession ¶ added in v0.2.0
func (*AdapterV1) Stream ¶ added in v0.2.0
func (a *AdapterV1) Stream(ctx context.Context, in chan exec.StreamInput) (chan exec.StreamOutput, error)
type AttachSessionResult ¶
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 (*Client) CreateSession ¶
func (*Client) CreateTerminal ¶
func (c *Client) CreateTerminal(opts CreateTerminalOptions) (*sdkexec.Session, error)
func (*Client) DetachSession ¶
func (*Client) GetPluginHandlers ¶
func (*Client) ListPlugins ¶
func (*Client) ResizeSession ¶
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 logging.Logger, sp pkgsettings.Provider, resourceClient resource.Service, ) Controller
type CreateTerminalOptions ¶
type ExecProvider ¶ added in v0.2.0
type ExecProvider interface {
GetSupportedResources(ctx *types.PluginContext) []exec.Handler
GetSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)
ListSessions(ctx *types.PluginContext) ([]*exec.Session, error)
CreateSession(ctx *types.PluginContext, opts exec.SessionOptions) (*exec.Session, error)
AttachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, []byte, error)
DetachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)
CloseSession(ctx *types.PluginContext, sessionID string) error
ResizeSession(ctx *types.PluginContext, sessionID string, cols, rows int32) error
Stream(ctx context.Context, in chan exec.StreamInput) (chan exec.StreamOutput, error)
Close()
}
ExecProvider is the engine's version-independent interface for exec plugins. For v1, method signatures match SDK exec.Provider exactly (doc 20 §13.7). When v2 redesigns exec (context.Context, interfaces), this diverges.
Click to show internal directories.
Click to hide internal directories.