common

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuferSize = 1 * 1024
)

Variables

This section is empty.

Functions

func DailDirect added in v0.8.2

func DailDirect(host, port, category string, proxyConn net.Conn) error

func GetDomainFromHost added in v0.8.0

func GetDomainFromHost(host string) (string, error)

func GetPodIpFromService added in v0.8.0

func GetPodIpFromService(service string) (string, string, error)

func GetRemoteAddr added in v0.8.2

func GetRemoteAddr(host, category string) string

func GetRemoteConn added in v0.8.0

func GetRemoteConn(nodeName, category string) (net.Conn, error)

func GetRemoteProxyServerPort added in v0.8.0

func GetRemoteProxyServerPort(category string) string

func ProxyEdgeNode added in v0.7.0

func ProxyEdgeNode(nodename, host, port, category string, proxyConn net.Conn, req *bytes.Buffer) error

func Read

func Read(conn net.Conn, node context.Node, category, handleType, uuid, addr string)

func Write

func Write(conn net.Conn, ch context.Conn)

Types

type TargetType added in v0.8.0

type TargetType int
const (
	LocalPodType  TargetType = 0 //transfer through the tunnel of this tunnel-cloud pod
	RemotePodType TargetType = 1 //transfer through the tunnel of other tunnel-cloud pod
	CloudNodeType TargetType = 2 //send requests directly in this tunnel-cloud pod
	EdgeNodeType  TargetType = 3 //the target node is on the edge and cannot send requests directly
)

func GetTargetType added in v0.8.0

func GetTargetType(nodeName string) TargetType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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