remote

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ManagerTunnelServerFun func(proxyId string, ch transport.Channel) error

ManagerTunnelServerFun handles heartbeat-driven tunnel management.

View Source
var OpenTunnelServerFun func(req *exchange.OpenTunnelReq, ch transport.Channel) (*TunnelCfg, error)

OpenTunnelServerFun handles open-tunnel requests on the server.

Functions

func ManagerTunnelServer

func ManagerTunnelServer(req *exchange.Heartbeat, ch transport.Channel) error

ManagerTunnelServer dispatches heartbeat tunnel updates to the configured handler.

func Register

func Register[T exchange.InBound](cmd exchange.Cmd, process InProcess[T], isResponse bool)

Register [T inter.InBound]

@Description: register process.
@param cmd
@param process

Types

type InProcess

type InProcess[T exchange.InBound] func(request T, ch transport.Channel) (any, error)

type InServer

type InServer struct {
	srv.BaseServerHandler
	// contains filtered or unexported fields
}
var Inserver *InServer

Inserver holds the active inbound server instance.

func New

func New() *InServer

func (*InServer) Open added in v0.4.0

func (t *InServer) Open(ch transport.Channel, traverse srv.TraverseBy) error

func (*InServer) Reader

func (t *InServer) Reader(ch transport.Channel, traverse srv.TraverseBy) error

func (*InServer) Shutdown

func (t *InServer) Shutdown()

Shutdown This function shuts down the InServer instance

func (*InServer) Start

func (t *InServer) Start(cf *configs.ServerConfig) *InServer

Start

@Description:  Start In Server. Port is between 4000 and  9000.
@receiver t
@param cf configs.

type TunnelCfg

type TunnelCfg struct {
	RemotePort  int
	Destination string
}

TunnelCfg describes the tunnel configuration returned by the server.

func NewTunnelCfg

func NewTunnelCfg(remotePort int, destination string) *TunnelCfg

NewTunnelCfg creates a new TunnelCfg with the provided values.

func OpenTunnelServer

func OpenTunnelServer(req *exchange.OpenTunnelReq, ch transport.Channel) (*TunnelCfg, error)

OpenTunnelServer dispatches an open-tunnel request to the configured handler.

Jump to

Keyboard shortcuts

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