Documentation ¶
Index ¶
- Variables
- func GroupRouter() http.Handler
- func Register(route ...externalRouter)
- func SetUIPath(path string)
- func Start(addr string, tlsAddr string, secret string, certificate, privateKey string, ...)
- func StartUnix(addr string, dohServer string, isDebug bool)
- type HTTPError
- type Log
- type LogStructured
- type LogStructuredField
- type Memory
- type Rule
- type Traffic
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CtxKeyProxyName = contextKey("proxy name") CtxKeyProviderName = contextKey("provider name") CtxKeyProxy = contextKey("proxy") CtxKeyProvider = contextKey("provider") )
View Source
var ( ErrBadRequest = newError("Body invalid") ErrForbidden = newError("Forbidden") ErrNotFound = newError("Resource not found") ErrRequestTimeout = newError("Timeout") )
View Source
var (
SwitchProxiesCallback func(sGroup string, sProxy string)
)
Functions ¶
func GroupRouter ¶
Types ¶
type HTTPError ¶
type HTTPError struct {
Message string `json:"message"`
}
HTTPError is custom HTTP error for API
type LogStructured ¶
type LogStructured struct { Time string `json:"time"` Level string `json:"level"` Message string `json:"message"` Fields []LogStructuredField `json:"fields"` }
type LogStructuredField ¶
Click to show internal directories.
Click to hide internal directories.