💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[概述] context.go是dotweb最核心的文件之一,它是请求入口又是上下文。context.go包含一个Context接口,它包含52个函数,由HttpContext结构体实现。 [type] ~~~ HttpContext struct { context context.Context //暂未启用 cancle context.CancelFunc request *Request routerNode RouterNode routerParams Params response *Response webSocket *WebSocket hijackConn *HijackConn isWebSocket bool isHijack bool isEnd bool //表示当前处理流程是否需要终止 httpServer *HttpServer sessionID string items *core.ItemContext viewData *core.ItemContext features *xFeatureTools handler HttpHandle startTime time.Time } ~~~