networker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: AGPL-3.0 Imports: 13 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 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 (c *Client) GetSupportedPortForwardTargets(plugin string) []string

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

	// 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 *zap.SugaredLogger,
	sp pkgsettings.Provider,
	resourceClient resource.IClient,
) Controller

Jump to

Keyboard shortcuts

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