Documentation ¶
Index ¶
- Variables
- func DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (net.Conn, *http.Response, error)
- 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 Config
- type File
- type HandshakeError
- type Logger
- type Route
- type Setting
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") ErrResTO = errors.New("ErrResTO") ErrUriTooLong = errors.New("ErrUriTooLong") ErrPatherCheckFail = errors.New("ErrPatherCheckFail") ErrHeaderCheckFail = errors.New("ErrHeaderCheckFail") ErrBodyCheckFail = errors.New("ErrBodyCheckFail") ErrAllBacksFail = errors.New("ErrAllBacksFail") ErrBackFail = errors.New("ErrBackFail") ErrNoRoute = errors.New("ErrNoRoute") ErrDealReqHeader = errors.New("ErrDealReqHeader") ErrDealResHeader = errors.New("ErrDealResHeader") )
Functions ¶
func DialContext ¶ added in v0.1.20231214143418
Types ¶
type Back ¶
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 Route ¶
type Route struct { Path string `json:"path"` PathAdd bool `json:"pathAdd"` RollRule string `json:"rollRule"` ReqBody filiter.Body `json:"reqBody"` Setting Backs []Back `json:"backs"` // contains filtered or unexported fields }
func (*Route) FiliterBackByRequest ¶ added in v0.1.20240305005058
Click to show internal directories.
Click to hide internal directories.