route

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPort = 0
	MaxPort = 65535
)

Variables

View Source
var (
	ErrInvalidPortSyntax = gperr.New("invalid port syntax, expect [listening_port:]target_port")
	ErrPortOutOfRange    = gperr.New("port out of range")
)
View Source
var ErrInvalidScheme = gperr.New("invalid scheme")

Functions

This section is empty.

Types

type HTTPConfig

type HTTPConfig struct {
	NoTLSVerify           bool          `json:"no_tls_verify,omitempty"`
	ResponseHeaderTimeout time.Duration `json:"response_header_timeout,omitempty"`
}

type Port

type Port struct {
	Listening int `json:"listening"`
	Proxy     int `json:"proxy"`
}

func (*Port) Parse

func (p *Port) Parse(v string) (err error)

Parse implements strutils.Parser.

func (*Port) String

func (p *Port) String() string

type RouteType

type RouteType string
const (
	RouteTypeStream RouteType = "stream"
	RouteTypeHTTP   RouteType = "http"
)

type Scheme

type Scheme string
const (
	SchemeHTTP       Scheme = "http"
	SchemeHTTPS      Scheme = "https"
	SchemeTCP        Scheme = "tcp"
	SchemeUDP        Scheme = "udp"
	SchemeFileServer Scheme = "fileserver"
)

func (Scheme) IsReverseProxy

func (s Scheme) IsReverseProxy() bool

func (Scheme) IsStream

func (s Scheme) IsStream() bool

func (Scheme) Validate

func (s Scheme) Validate() gperr.Error

Jump to

Keyboard shortcuts

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