Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientIP ¶
func ClientIP(ctx *fasthttp.RequestCtx) string
ClientIP 获取真实的IP 1.1.1.1, 2.2.2.2, 3.3.3.3
Types ¶
type GatewayParser ¶
type GatewayParser struct {
// contains filtered or unexported fields
}
func (*GatewayParser) ParseRequest ¶
func (p *GatewayParser) ParseRequest(ctx *fiber.Ctx) (*message.Request, error)
func (*GatewayParser) ParseResponse ¶
type GatewayResponse ¶
type Option ¶
type Option func(*Server)
func Config ¶
func Config(c *trellis.HTTPServerConfig) Option
func ServerName ¶
type Parser ¶
type Parser interface { ParseRequest(ctx *fiber.Ctx) (*message.Request, error) ParseResponse(ctx *fiber.Ctx, req *message.Request, msg *message.Response) error }
func NewServerParser ¶
func NewServerParser() Parser
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) RegisterGroupHandlers ¶
func (*Server) RegisterHandlers ¶
func (p *Server) RegisterHandlers(cfgs ...*trellis.HTTPHandler) error
type ServerParser ¶
type ServerParser struct{}
func (*ServerParser) ParseRequest ¶
func (*ServerParser) ParseRequest(ctx *fiber.Ctx) (*message.Request, error)
func (*ServerParser) ParseResponse ¶
Click to show internal directories.
Click to hide internal directories.