Documentation ¶
Index ¶
- Variables
- func BodyMatchs(matchBody []Body, r *http.Request) (reader io.ReadCloser, e error)
- func DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (net.Conn, *http.Response, error)
- func HeaderMatchs(matchHeader []Header, r *http.Request) bool
- func LoadPeriod(ctx context.Context, buf []byte, configF File, configS *[]Config, ...) error
- func Test(ctx context.Context, port int, logger Logger)
- func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (net.Conn, error)
- type Back
- type Body
- type Config
- type File
- type HandshakeError
- type Header
- type Logger
- type Matcher
- type Route
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRedirect = errors.New("ErrRedirect") ErrNoHttp = errors.New("ErrNoHttp") ErrNoWs = errors.New("ErrNoWs") ErrCopy = errors.New("ErrCopy") ErrReqCreFail = errors.New("ErrReqCreFail") ErrReqDoFail = errors.New("ErrReqDoFail") ErrResDoFail = errors.New("ErrResDoFail") ErrHeaderCheckFail = errors.New("ErrHeaderCheckFail") ErrBodyCheckFail = errors.New("ErrBodyCheckFail") )
Functions ¶
func BodyMatchs ¶ added in v0.1.20240305172524
func DialContext ¶ added in v0.1.20231214143418
func HeaderMatchs ¶ added in v0.1.20240305172524
Types ¶
type Back ¶
type Body ¶ added in v0.1.20240305172524
type Body struct { Action string `json:"action"` ReqSize string `json:"reqSize"` MatchExp string `json:"matchExp"` }
func (*Body) Match ¶ added in v0.1.20240305172524
func (t *Body) Match(r io.ReadCloser) (d io.ReadCloser, err error)
type Config ¶
type Config struct { Addr string `json:"addr"` TLS struct { Pub string `json:"pub"` Key string `json:"key"` } `json:"tls"` MatchRule string `json:"matchRule"` CopyBlocks int `json:"copyBlocks"` BlocksI pslice.BlocksI[byte] `json:"-"` Routes []Route `json:"routes"` // contains filtered or unexported fields }
type HandshakeError ¶ added in v0.1.20231214143418
type HandshakeError struct {
// contains filtered or unexported fields
}
func (HandshakeError) Error ¶ added in v0.1.20231214143418
func (t HandshakeError) Error() string
type Header ¶
Click to show internal directories.
Click to hide internal directories.