networker

package
v0.35.2 Latest Latest
Warning

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

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

View Source
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 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 networker.Provider) *AdapterV1

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 (*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)

func (*AdapterV1) StopAll added in v0.2.0

func (a *AdapterV1) StopAll()

type Controller

type Controller interface {
	internaltypes.Controller

	// ServiceStartup initialises the controller during application startup.
	ServiceStartup(ctx context.Context, options application.ServiceOptions) error
	// ServiceShutdown cleans up resources during application shutdown.
	ServiceShutdown() error
	SetReferenceAdmitter(resource.ReferenceAdmitter)

	// 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(
		ctx context.Context,
		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.ConnectionReader,
) Controller

type Provider added in v0.4.0

type Provider 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()
}

Provider 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.

type ServiceWrapper added in v0.4.0

type ServiceWrapper struct {
	Ctrl  Controller
	Realm invocation.ContextScope
}

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

OnPluginDestroy

func (*ServiceWrapper) ClosePortForwardSession added in v0.4.0

func (s *ServiceWrapper) ClosePortForwardSession(sessionID string) (*networkersdk.PortForwardSession, error)

func (*ServiceWrapper) FindPortForwardSessions added in v0.4.0

func (s *ServiceWrapper) FindPortForwardSessions(
	pluginID, connectionID string,
	request networkersdk.FindPortForwardSessionRequest,
) ([]*networkersdk.PortForwardSession, error)

func (*ServiceWrapper) GetPortForwardSession added in v0.4.0

func (s *ServiceWrapper) GetPortForwardSession(sessionID string) (*networkersdk.PortForwardSession, error)

func (*ServiceWrapper) GetSupportedPortForwardTargets added in v0.4.0

func (s *ServiceWrapper) GetSupportedPortForwardTargets(pluginID string) ([]string, error)

func (*ServiceWrapper) HasPlugin added in v0.4.0

func (s *ServiceWrapper) HasPlugin(pluginID string) bool

func (*ServiceWrapper) ListAllPortForwardSessions added in v0.4.0

func (s *ServiceWrapper) ListAllPortForwardSessions() ([]*networkersdk.PortForwardSession, error)

func (*ServiceWrapper) ListPlugins added in v0.4.0

func (s *ServiceWrapper) ListPlugins() ([]string, error)

func (*ServiceWrapper) ListPortForwardSessions added in v0.4.0

func (s *ServiceWrapper) ListPortForwardSessions(
	pluginID, connectionID string,
) ([]*networkersdk.PortForwardSession, 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) StartResourcePortForwardingSession added in v0.4.0

func (s *ServiceWrapper) StartResourcePortForwardingSession(
	ctx context.Context,
	pluginID, connectionID string,
	encoded string,
) (*networkersdk.PortForwardSession, error)

Jump to

Keyboard shortcuts

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