Documentation
¶
Index ¶
- Constants
- Variables
- func ALPN(a protocol.Link_ALPN) string
- func ClientHostnamesPrefix(token *protocol.ClientToken) string
- func ClientLeaseKey(token *protocol.ClientToken) string
- func ClientTokenKey(token *protocol.ClientToken) string
- func CustomHostnameKey(hostname string) string
- func DestinationByChordKey(chord *protocol.Node) string
- func DestinationByTunnelKey(tunnel *protocol.Node) string
- func DrainStatusProto(src io.Reader) (err error)
- func FindCustomHostname(ctx context.Context, kv chord.KV, hostname string) (*protocol.CustomHostname, error)
- func IsNoDirect(err error) bool
- func IsTimeout(err error) bool
- func Pipe(src, dst io.ReadWriteCloser) <-chan error
- func RemoveCustomHostname(ctx context.Context, kv chord.KV, hostname string) error
- func RoutingKey(hostname string, num int) string
- func SaveCustomHostname(ctx context.Context, kv chord.KV, hostname string, ...) (err error)
- func SendStatusProto(dest io.Writer, err error)
- type DNSResolver
- type Server
Constants ¶
View Source
const (
BufferSize = 1024 * 16
)
View Source
const (
NumRedundantLinks = 3
)
Variables ¶
View Source
var ( ErrLookupFailed = fmt.Errorf("tun: failed to lookup tunnel on specter network") ErrDestinationNotFound = fmt.Errorf("tun: tunnel not found on specter network") ErrTunnelClientNotConnected = fmt.Errorf("tun: tunnel client is not connected to any nodes") ErrHostnameNotFound = fmt.Errorf("tun: custom hostname is not registered") )
Functions ¶
func ClientHostnamesPrefix ¶
func ClientHostnamesPrefix(token *protocol.ClientToken) string
func ClientLeaseKey ¶
func ClientLeaseKey(token *protocol.ClientToken) string
func ClientTokenKey ¶
func ClientTokenKey(token *protocol.ClientToken) string
func CustomHostnameKey ¶
func DestinationByChordKey ¶
func DestinationByTunnelKey ¶
func DrainStatusProto ¶
func FindCustomHostname ¶
func IsNoDirect ¶
func Pipe ¶
func Pipe(src, dst io.ReadWriteCloser) <-chan error
func RemoveCustomHostname ¶
func RoutingKey ¶
func SaveCustomHostname ¶
func SendStatusProto ¶
Types ¶
type DNSResolver ¶
Click to show internal directories.
Click to hide internal directories.