Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRulePriority ¶
GetRulePriority computes the priority for a given rule. The priority is calculated using the length of rule. There is a special case where the HostSNI(`*`) has a priority of -1.
func ParseHostSNI ¶
ParseHostSNI extracts the HostSNIs declared in a rule. This is a first naive implementation used in TCP routing.
Types ¶
type ConnData ¶
type ConnData struct {
// contains filtered or unexported fields
}
ConnData contains TCP connection metadata.
func NewConnData ¶
NewConnData builds a connData struct from the given parameters.
type Muxer ¶
type Muxer struct {
// contains filtered or unexported fields
}
Muxer defines a muxer that handles TCP routing with rules.
func (*Muxer) AddRoute ¶
AddRoute adds a new route, associated to the given handler, at the given priority, to the muxer.
Click to show internal directories.
Click to hide internal directories.