constants

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NullString is the string representation of the JSON null value.
	NullString = "null"

	// NetEmpty et al are networks for net.Dial() and friends.
	NetEmpty      = ""
	NetUDP        = "udp"
	NetUDP4       = "udp4"
	NetUDP6       = "udp6"
	NetTCP        = "tcp"
	NetTCP4       = "tcp4"
	NetTCP6       = "tcp6"
	NetUnix       = "unix"
	NetUnixgram   = "unixgram"
	NetUnixPacket = "unixpacket"

	// SchemeHTTP et al are URL schemes.
	SchemeHTTP  = "http"
	SchemeHTTPS = "https"

	// SchemeEmpty et al are RoxyTarget schemes.
	SchemeEmpty        = ""
	SchemePassthrough  = "passthrough"
	SchemeUnix         = "unix"
	SchemeUnixAbstract = "unix-abstract"
	SchemeIP           = "ip"
	SchemeDNS          = "dns"
	SchemeSRV          = "srv"
	SchemeZK           = "zk"
	SchemeEtcd         = "etcd"
	SchemeATC          = "atc"

	// PortDNS et al are TCP or UDP port numbers, in decimal string form.
	PortDNS   = "53"
	PortHTTP  = "80"
	PortHTTPS = "443"
	PortZK    = "2181"
	PortEtcd  = "2379"
	PortATC   = "2987"

	// SubsystemAdmin et al are server subsystem names.
	SubsystemAdmin = "admin"
	SubsystemProm  = "prom"
	SubsystemHTTP  = "http"
	SubsystemHTTPS = "https"
	SubsystemGRPC  = "grpc"
)

Various constants.

Variables

View Source
var (
	// NullBytes is the []byte representation of the JSON null value.
	NullBytes = []byte("null")
)

Functions

func IsNetTCP

func IsNetTCP(str string) bool

IsNetTCP returns true iff its argument is an AF_INET/AF_INET6 network with IPPROTO_TCP.

func IsNetUDP

func IsNetUDP(str string) bool

IsNetUDP returns true iff its argument is an AF_INET/AF_INET6 network with IPPROTO_UDP.

func IsNetUnix

func IsNetUnix(str string) bool

IsNetUnix returns true iff its argument is an AF_UNIX network.

Types

This section is empty.

Jump to

Keyboard shortcuts

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