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

Method DistributeToModelPipelines

ai-provider/local/executor.go:194–208  ·  view source on GitHub ↗

DistributeToModelPipelines 仅将消息分发给指定模型的管道

(model string, msg PullMessage)

Source from the content-addressed store, hash-verified

192
193// DistributeToModelPipelines 仅将消息分发给指定模型的管道
194func (e *AsyncExecutor) DistributeToModelPipelines(model string, msg PullMessage) {
195 e.mu.Lock()
196 defer e.mu.Unlock()
197 pipelines, ok := e.pipelines[model]
198 if !ok {
199 return
200 }
201 for _, pipeline := range pipelines.List() {
202 select {
203 case pipeline.channel <- msg:
204 default:
205 // 如果管道已满,跳过
206 }
207 }
208}
209
210type PullCallback func(msg PullMessage) error
211

Callers 1

Calls 1

ListMethod · 0.65

Tested by

no test coverage detected