MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / LogInfo

Method LogInfo

service/log/iml.go:223–261  ·  view source on GitHub ↗
(ctx context.Context, driver string, cluster string, id string)

Source from the content-addressed store, hash-verified

221}
222
223func (i *imlLogService) LogInfo(ctx context.Context, driver string, cluster string, id string) (*Info, error) {
224 d, has := log_driver.GetDriver(driver)
225 if !has {
226 return nil, errors.New("driver not found")
227 }
228 info, err := d.LogInfo(cluster, id)
229 if err != nil {
230 return nil, err
231 }
232 return &Info{
233 Item: Item{
234 ID: info.ID,
235 Strategy: info.Strategy,
236 Service: info.Service,
237 API: info.API,
238 Method: info.Method,
239 Url: info.Url,
240 RemoteIP: info.RemoteIP,
241 Consumer: info.Consumer,
242 Authorization: info.Authorization,
243 InputToken: info.InputToken,
244 OutputToken: info.OutputToken,
245 TotalToken: info.TotalToken,
246 AIProvider: info.AIProvider,
247 AIModel: info.AIModel,
248 StatusCode: info.StatusCode,
249 ResponseTime: info.ResponseTime,
250 Traffic: info.Traffic,
251 RecordTime: info.RecordTime,
252 },
253 ContentType: info.ContentType,
254 RequestBody: info.RequestBody,
255 ProxyBody: info.ProxyBody,
256 ProxyResponseBody: info.ProxyResponseBody,
257 ResponseBody: info.ResponseBody,
258 RequestHeader: info.RequestHeader,
259 ResponseHeader: info.ResponseHeader,
260 }, nil
261}

Callers

nothing calls this directly

Calls 2

GetDriverMethod · 0.80
LogInfoMethod · 0.65

Tested by

no test coverage detected