exec

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 29 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 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

func NewAdapterV1(inner exec.Provider) *AdapterV1

NewAdapterV1 creates a new v1 adapter wrapping the given SDK exec provider.

func (*AdapterV1) AttachSession added in v0.2.0

func (a *AdapterV1) AttachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, []byte, error)

func (*AdapterV1) Close added in v0.2.0

func (a *AdapterV1) Close()

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 (a *AdapterV1) DetachSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)

func (*AdapterV1) GetSession added in v0.2.0

func (a *AdapterV1) GetSession(ctx *types.PluginContext, sessionID string) (*exec.Session, error)

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 (a *AdapterV1) ListSessions(ctx *types.PluginContext) ([]*exec.Session, error)

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 (a *AdapterV1) ResizeSession(ctx *types.PluginContext, sessionID string, cols, rows int32) error

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(plugin, connectionID string, opts exec.SessionOptions) (*exec.Session, error)
	OpenNativeSession(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
}

ServiceWrapper is an explicit delegation wrapper around exec.Controller. Excluded: OnPluginInit, OnPluginStart, OnPluginStop, OnPluginShutdown,

OnPluginDestroy

func (*ServiceWrapper) AttachSession added in v0.4.0

func (s *ServiceWrapper) AttachSession(sessionID string) (*execsdk.Session, []byte, error)

func (*ServiceWrapper) CloseSession added in v0.4.0

func (s *ServiceWrapper) CloseSession(sessionID string) error

func (*ServiceWrapper) CreateSession added in v0.4.0

func (s *ServiceWrapper) CreateSession(
	plugin, connectionID string,
	encoded string,
) (*execsdk.Session, error)

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, 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(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

Jump to

Keyboard shortcuts

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