multiplexing

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTP

func HTTP() cmux.Matcher

func HTTPMatchAnd

func HTTPMatchAnd(reqMatchers ...RequestMatcher) cmux.Matcher

func HTTPMatchOr

func HTTPMatchOr(reqMatchers ...RequestMatcher) cmux.Matcher

Types

type HTTP2PseudoHeader

type HTTP2PseudoHeader string
const (
	HTTP2PseudoHeaderMethod    HTTP2PseudoHeader = ":method"
	HTTP2PseudoHeaderScheme    HTTP2PseudoHeader = ":scheme"
	HTTP2PseudoHeaderAuthority HTTP2PseudoHeader = ":authority"
	HTTP2PseudoHeaderPath      HTTP2PseudoHeader = ":path"
)

type HTTPVersion

type HTTPVersion uint8
const (
	HTTPVersionUnknown HTTPVersion = iota
	HTTPVersion10
	HTTPVersion11
	HTTPVersion2
)

type RequestMatcher

type RequestMatcher func(req *RequestPreface) bool

func PathPrefixMatcher

func PathPrefixMatcher(prefix string) RequestMatcher

type RequestPreface

type RequestPreface struct {
	Version HTTPVersion
	Scheme  string
	Method  string
	Host    string
	Path    string
	Header  http.Header
}

Jump to

Keyboard shortcuts

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