client

package
v0.0.0-...-5da1e5c Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeHTTP = typeHeaderValue("http")
View Source
var TypeTCP = typeHeaderValue("tcp")

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	Dial() (net.Conn, error)
}

type ServerInfo

type ServerInfo struct {
	Host            *url.URL
	ControlHostname string
	Dialer          Dialer
}

func ParseHostURL

func ParseHostURL(host *url.URL) (ServerInfo, error)

type TcpDialer

type TcpDialer string

func (TcpDialer) Dial

func (addr TcpDialer) Dial() (net.Conn, error)

type TlsDialer

type TlsDialer string

func (TlsDialer) Dial

func (addr TlsDialer) Dial() (net.Conn, error)

type TokenRefresher

type TokenRefresher interface {
	SetToken(token string)
}

type TokenRetriever

type TokenRetriever interface {
	GetToken() string
}

type TokenStore

type TokenStore interface {
	TokenRetriever
	TokenRefresher
}

type TunnelInfo

type TunnelInfo struct {
	Id      string
	Token   string
	Address string
	Version *semver.Version
}

func Handshake

func Handshake(conn net.Conn, hostname string, tunnel *TunnelInfo, t TunnelType) (TunnelInfo, error)

type TunnelInfoSetter

type TunnelInfoSetter interface {
	SetTunnelInfo(info TunnelInfo)
}

type TunnelType

type TunnelType interface {
	AddHeaders(req *http.Request) error
}

Jump to

Keyboard shortcuts

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