fasthttp

package module
v0.0.0-...-a3e4828 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter FastHTTP适配器

func NewAdapter

func NewAdapter(router *xray.Router) *Adapter

func (*Adapter) ServeFastHTTP

func (c *Adapter) ServeFastHTTP(ctx *fasthttp.RequestCtx)

ServeFastHTTP 服务HTTP

func (*Adapter) SetRouter

func (c *Adapter) SetRouter(r *xray.Router) *Adapter

SetRouter 设置路由器

type RootController

type RootController struct{}

func (*RootController) ClientIP

func (c *RootController) ClientIP(ctx *xray.Context) string

ClientIP 获取客户端IP, 优先从X-Real-IP中获取 get the client IP, preferably from the X-Real-IP

func (*RootController) GetRequest

func (c *RootController) GetRequest(ctx *xray.Context) *fasthttp.Request

GetRequest 获取fasthttp请求

func (*RootController) GetResponseWriter

func (c *RootController) GetResponseWriter(ctx *xray.Context) *fasthttp.Response

GetResponseWriter 获取fasthttp响应写入器

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL