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) PlanNativeCommand(ctx *types.PluginContext, opts exec.SessionOptions) (*exec.NativeCommand, 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 Controller
- type Provider
- type ServiceWrapper
- func (s *ServiceWrapper) AttachSession(sessionID string) (*execsdk.Session, []byte, error)
- func (s *ServiceWrapper) CloseSession(sessionID string) error
- func (s *ServiceWrapper) CreateSession(ctx context.Context, plugin, connectionID string, encoded string) (*execsdk.Session, error)
- func (s *ServiceWrapper) CreateTerminal(opts execsdk.SessionOptions) (*execsdk.Session, error)
- func (s *ServiceWrapper) DetachSession(sessionID string) (*execsdk.Session, error)
- func (s *ServiceWrapper) GetHandler(plugin, resource string) *execsdk.Handler
- func (s *ServiceWrapper) GetHandlers() map[string]map[string]execsdk.Handler
- func (s *ServiceWrapper) GetNativeTerminalApplications() (_ []nativeapps.Application, err error)
- func (s *ServiceWrapper) GetNativeTerminalSupport() bool
- func (s *ServiceWrapper) GetPluginHandlers(plugin string) map[string]execsdk.Handler
- func (s *ServiceWrapper) GetSession(sessionID string) (*execsdk.Session, error)
- func (s *ServiceWrapper) HasPlugin(pluginID string) bool
- func (s *ServiceWrapper) ListPlugins() ([]string, error)
- func (s *ServiceWrapper) ListSessions() ([]*execsdk.Session, error)
- func (s *ServiceWrapper) OpenNativeSession(ctx context.Context, plugin, connectionID, encoded string) error
- func (s *ServiceWrapper) ResizeSession(sessionID string, rows, cols uint16) error
- func (s *ServiceWrapper) ServiceShutdown() error
- func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
- func (s *ServiceWrapper) WriteSession(sessionID string, data []byte) error
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 Provider. 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) PlanNativeCommand ¶ added in v0.19.0
func (a *AdapterV1) PlanNativeCommand(ctx *types.PluginContext, opts exec.SessionOptions) (*exec.NativeCommand, error)
PlanNativeCommand preserves the optional SDK capability without a session fallback.
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 Controller ¶
type Controller interface {
internaltypes.Controller
ServiceStartup(ctx context.Context, options application.ServiceOptions) error
ServiceShutdown() error
SetReferenceAdmitter(resource.ReferenceAdmitter)
GetPluginHandlers(plugin string) map[string]exec.Handler
GetHandlers() map[string]map[string]exec.Handler
GetHandler(plugin, resource string) *exec.Handler
CreateSession(ctx context.Context, plugin, connectionID string, opts exec.SessionOptions) (*exec.Session, error)
OpenNativeSession(ctx context.Context, plugin, connectionID string, opts exec.SessionOptions) error
GetNativeTerminalSupport() bool
CreateTerminal(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.ConnectionReader, ) Controller
type Provider ¶ added in v0.4.0
type Provider 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()
}
Provider 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.
type ServiceWrapper ¶ added in v0.4.0
type ServiceWrapper struct {
Ctrl Controller
Realm invocation.ContextScope
}
ServiceWrapper is an explicit delegation wrapper around exec.Controller. Excluded: OnPluginInit, OnPluginStart, OnPluginStop, OnPluginShutdown,
OnPluginDestroy
func (*ServiceWrapper) AttachSession ¶ added in v0.4.0
func (*ServiceWrapper) CloseSession ¶ added in v0.4.0
func (s *ServiceWrapper) CloseSession(sessionID string) error
func (*ServiceWrapper) CreateSession ¶ added in v0.4.0
func (*ServiceWrapper) CreateTerminal ¶ added in v0.4.0
func (s *ServiceWrapper) CreateTerminal(opts execsdk.SessionOptions) (*execsdk.Session, error)
func (*ServiceWrapper) DetachSession ¶ added in v0.4.0
func (s *ServiceWrapper) DetachSession(sessionID string) (*execsdk.Session, error)
func (*ServiceWrapper) GetHandler ¶ added in v0.4.0
func (s *ServiceWrapper) GetHandler(plugin, resource string) *execsdk.Handler
func (*ServiceWrapper) GetHandlers ¶ added in v0.4.0
func (s *ServiceWrapper) GetHandlers() map[string]map[string]execsdk.Handler
func (*ServiceWrapper) GetNativeTerminalApplications ¶ added in v0.22.0
func (s *ServiceWrapper) GetNativeTerminalApplications() (_ []nativeapps.Application, err error)
GetNativeTerminalApplications discovers installed applications with safe native launch adapters.
func (*ServiceWrapper) GetNativeTerminalSupport ¶ added in v0.19.0
func (s *ServiceWrapper) GetNativeTerminalSupport() bool
func (*ServiceWrapper) GetPluginHandlers ¶ added in v0.4.0
func (s *ServiceWrapper) GetPluginHandlers(plugin string) map[string]execsdk.Handler
func (*ServiceWrapper) GetSession ¶ added in v0.4.0
func (s *ServiceWrapper) GetSession(sessionID string) (*execsdk.Session, error)
func (*ServiceWrapper) HasPlugin ¶ added in v0.4.0
func (s *ServiceWrapper) HasPlugin(pluginID string) bool
func (*ServiceWrapper) ListPlugins ¶ added in v0.4.0
func (s *ServiceWrapper) ListPlugins() ([]string, error)
func (*ServiceWrapper) ListSessions ¶ added in v0.4.0
func (s *ServiceWrapper) ListSessions() ([]*execsdk.Session, error)
func (*ServiceWrapper) OpenNativeSession ¶ added in v0.19.0
func (s *ServiceWrapper) OpenNativeSession(ctx context.Context, plugin, connectionID, encoded string) error
OpenNativeSession accepts only the same bounded resource payload as CreateSession. Executables and launch commands are never accepted from the frontend.
func (*ServiceWrapper) ResizeSession ¶ added in v0.4.0
func (s *ServiceWrapper) ResizeSession(sessionID string, rows, cols uint16) error
func (*ServiceWrapper) ServiceShutdown ¶ added in v0.4.0
func (s *ServiceWrapper) ServiceShutdown() error
func (*ServiceWrapper) ServiceStartup ¶ added in v0.4.0
func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
func (*ServiceWrapper) WriteSession ¶ added in v0.4.0
func (s *ServiceWrapper) WriteSession(sessionID string, data []byte) error