networker

package
v0.0.1-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

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

	// 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)

	// 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