MCPcopy
hub / github.com/QuantumNous/new-api / Init

Method Init

service/task_polling.go:28–28  ·  view source on GitHub ↗
(info *relaycommon.RelayInfo)

Source from the content-addressed store, hash-verified

26// TaskPollingAdaptor 定义轮询所需的最小适配器接口,避免 service -> relay 的循环依赖
27type TaskPollingAdaptor interface {
28 Init(info *relaycommon.RelayInfo)
29 FetchTask(baseURL string, key string, body map[string]any, proxy string) (*http.Response, error)
30 ParseTaskResult(body []byte) (*relaycommon.TaskInfo, error)
31 // AdjustBillingOnComplete 在任务到达终态(成功/失败)时由轮询循环调用。

Callers 1

updateVideoTasksFunction · 0.65

Implementers 2

taskPollingFetchAdaptorservice/task_polling_test.go
mockAdaptorservice/task_billing_test.go

Calls

no outgoing calls

Tested by

no test coverage detected