tunnel

package
v0.21.261 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DestinationProtocolKey = "dst_protocol"
	DestinationHostname    = "dst_hostname"
	DestinationIpKey       = "dst_ip"
	DestinationPortKey     = "dst_port"
	SourceAddrKey          = "source_addr"

	SourceIpKey   = "src_ip"
	SourcePortKey = "src_port"
)

Variables

This section is empty.

Functions

func AppDataToMap added in v0.19.43

func AppDataToMap(appData []byte) (map[string]interface{}, error)

func DialAndRun added in v0.16.20

func DialAndRun(service Service, identity string, clientConn net.Conn, appInfo map[string]string, halfClose bool)

func GetAppInfo added in v0.19.63

func GetAppInfo(protocol, dstHostname, dstIp, dstPort, sourceAddr string) map[string]string

func GetIpAndPort added in v0.19.63

func GetIpAndPort(addr net.Addr) (string, string)

func Run

func Run(zitiConn net.Conn, clientConn net.Conn, halfClose bool)

Types

type FabricProvider added in v0.19.10

type FabricProvider interface {
	PrepForUse(serviceId string)
	GetCurrentIdentity() (*edge.CurrentIdentity, error)
	TunnelService(service Service, identity string, conn net.Conn, halfClose bool, appInfo []byte) error
	HostService(hostCtx HostingContext) (HostControl, error)
}

func NewContextProvider added in v0.19.10

func NewContextProvider(context ziti.Context) FabricProvider

type HostControl added in v0.19.10

type HostControl interface {
	io.Closer
	UpdateCost(cost uint16) error
	UpdatePrecedence(precedence edge.Precedence) error
	UpdateCostAndPrecedence(cost uint16, precedence edge.Precedence) error
	SendHealthEvent(pass bool) error
}

type HostingContext added in v0.19.10

type HostingContext interface {
	ServiceName() string
	ListenOptions() *ziti.ListenOptions
	Dial(options map[string]interface{}) (net.Conn, bool, error)
	GetHealthChecks() []health.CheckDefinition
	GetInitialHealthState() (ziti.Precedence, uint16)
	OnClose()
	SetCloseCallback(func())
}

type Service added in v0.19.63

type Service interface {
	GetFabricProvider() FabricProvider
	GetName() string
	GetDialTimeout() time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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