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 Run(ctx context.Context, configSP *Config, logger Logger)
- 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 Header
- type Logger
- 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") )
Functions ¶
func DialContext ¶ added in v0.1.20231214143418
Types ¶
type Back ¶
type Back struct { Sign string `json:"-"` Splicing int `json:"-"` PathAdd bool `json:"-"` Name string `json:"name"` To string `json:"to"` Weight int `json:"weight"` ErrBanSec int `json:"errBanSec"` MatchHeader []Header `json:"matchHeader"` ReqHeader []Header `json:"reqHeader"` ResHeader []Header `json:"resHeader"` // contains filtered or unexported fields }
func FiliterBackByRequest ¶ added in v0.1.20240105165144
type Config ¶
type Config struct { Sign []*Route `json:"-"` Addr string `json:"addr"` TLS struct { Config *tls.Config `json:"-"` 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
Click to show internal directories.
Click to hide internal directories.