Documentation
¶
Index ¶
- Constants
- type AdapterV1
- func (a *AdapterV1) ClosePortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
- func (a *AdapterV1) FindPortForwardSessions(ctx *types.PluginContext, req networker.FindPortForwardSessionRequest) ([]*networker.PortForwardSession, error)
- func (a *AdapterV1) GetPortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
- func (a *AdapterV1) GetSupportedPortForwardTargets(ctx *types.PluginContext) ([]string, error)
- func (a *AdapterV1) ListPortForwardSessions(ctx *types.PluginContext) ([]*networker.PortForwardSession, error)
- func (a *AdapterV1) StartPortForwardSession(ctx *types.PluginContext, opts networker.PortForwardSessionOptions) (*networker.PortForwardSession, error)
- func (a *AdapterV1) StopAll()
- type Client
- func (c *Client) ClosePortForwardSession(sessionID string) (*sdknetworker.PortForwardSession, error)
- func (c *Client) FindPortForwardSessions(pluginID, connectionID string, ...) ([]*sdknetworker.PortForwardSession, error)
- func (c *Client) GetPortForwardSession(sessionID string) (*sdknetworker.PortForwardSession, error)
- func (c *Client) GetSupportedPortForwardTargets(plugin string) ([]string, error)
- func (c *Client) ListAllPortForwardSessions() ([]*sdknetworker.PortForwardSession, error)
- func (c *Client) ListPortForwardSessions(pluginID, connectionID string) ([]*sdknetworker.PortForwardSession, error)
- func (c *Client) StartResourcePortForwardingSession(pluginID, connectionID string, opts sdknetworker.PortForwardSessionOptions) (*sdknetworker.PortForwardSession, error)
- type Controller
- type NetworkerProvider
Constants ¶
const ( PortForwardSessionCreated = "core/networker/portforward/created" PortForwardSessionClosed = "core/networker/portforward/closed" )
Wails event keys for port-forward session lifecycle.
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 networker.Provider as the engine canonical NetworkerProvider. 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 networker provider.
func (*AdapterV1) ClosePortForwardSession ¶ added in v0.2.0
func (a *AdapterV1) ClosePortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
func (*AdapterV1) FindPortForwardSessions ¶ added in v0.2.0
func (a *AdapterV1) FindPortForwardSessions(ctx *types.PluginContext, req networker.FindPortForwardSessionRequest) ([]*networker.PortForwardSession, error)
func (*AdapterV1) GetPortForwardSession ¶ added in v0.2.0
func (a *AdapterV1) GetPortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
func (*AdapterV1) GetSupportedPortForwardTargets ¶ added in v0.2.0
func (a *AdapterV1) GetSupportedPortForwardTargets(ctx *types.PluginContext) ([]string, error)
func (*AdapterV1) ListPortForwardSessions ¶ added in v0.2.0
func (a *AdapterV1) ListPortForwardSessions(ctx *types.PluginContext) ([]*networker.PortForwardSession, error)
func (*AdapterV1) StartPortForwardSession ¶ added in v0.2.0
func (a *AdapterV1) StartPortForwardSession(ctx *types.PluginContext, opts networker.PortForwardSessionOptions) (*networker.PortForwardSession, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(controller Controller) *Client
func (*Client) ClosePortForwardSession ¶
func (c *Client) ClosePortForwardSession(sessionID string, ) (*sdknetworker.PortForwardSession, error)
ClosePortForwardSession closes a port forward session.
func (*Client) FindPortForwardSessions ¶
func (c *Client) FindPortForwardSessions( pluginID, connectionID string, request sdknetworker.FindPortForwardSessionRequest, ) ([]*sdknetworker.PortForwardSession, error)
func (*Client) GetPortForwardSession ¶
func (c *Client) GetPortForwardSession( sessionID string, ) (*sdknetworker.PortForwardSession, error)
func (*Client) GetSupportedPortForwardTargets ¶
func (*Client) ListAllPortForwardSessions ¶
func (c *Client) ListAllPortForwardSessions() ([]*sdknetworker.PortForwardSession, error)
func (*Client) ListPortForwardSessions ¶
func (c *Client) ListPortForwardSessions( pluginID, connectionID string, ) ([]*sdknetworker.PortForwardSession, error)
func (*Client) StartResourcePortForwardingSession ¶
func (c *Client) StartResourcePortForwardingSession( pluginID, connectionID string, opts sdknetworker.PortForwardSessionOptions, ) (*sdknetworker.PortForwardSession, error)
StartResourcePortForwardingSession starts a port forwarding session.
type Controller ¶
type Controller interface {
internaltypes.Controller
// Run stores the Wails application context for event emission.
Run(ctx context.Context)
// GetSupportedPortForwardTargets returns the supported targets for port forwarding
GetSupportedPortForwardTargets(pluginID string) ([]string, error)
// GetPortForwardSession returns a port forward session by ID
GetPortForwardSession(sessionID string) (*networker.PortForwardSession, error)
// ListPortForwardSessions returns a list of port forward sessions for a plugin
ListPortForwardSessions(pluginID, connectionID string) ([]*networker.PortForwardSession, error)
// ListAllPortForwardSessions returns all port forward sessions across all plugins
ListAllPortForwardSessions() ([]*networker.PortForwardSession, error)
// FindPortForwardSessions returns a list of port forward sessions for a plugin
FindPortForwardSessions(
pluginID, connectionID string,
request networker.FindPortForwardSessionRequest,
) ([]*networker.PortForwardSession, error)
// StartResourcePortForwardingSession starts a port forwarding session
StartResourcePortForwardingSession(
pluginID, connectionID string,
opts networker.PortForwardSessionOptions,
) (*networker.PortForwardSession, error)
// ClosePortForwardSession closes a port forward session
ClosePortForwardSession(sessionID string) (*networker.PortForwardSession, error)
}
func NewController ¶
func NewController( logger logging.Logger, sp pkgsettings.Provider, resourceClient resource.Service, ) Controller
type NetworkerProvider ¶ added in v0.2.0
type NetworkerProvider interface {
GetSupportedPortForwardTargets(ctx *types.PluginContext) ([]string, error)
GetPortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
ListPortForwardSessions(ctx *types.PluginContext) ([]*networker.PortForwardSession, error)
FindPortForwardSessions(ctx *types.PluginContext, req networker.FindPortForwardSessionRequest) ([]*networker.PortForwardSession, error)
StartPortForwardSession(ctx *types.PluginContext, opts networker.PortForwardSessionOptions) (*networker.PortForwardSession, error)
ClosePortForwardSession(ctx *types.PluginContext, sessionID string) (*networker.PortForwardSession, error)
StopAll()
}
NetworkerProvider is the engine's version-independent interface for networker plugins. For v1, method signatures match SDK networker.Provider exactly (doc 20 §13.7). When v2 redesigns networker (context.Context, interfaces), this diverges.