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

Method AddPipeline

ai-provider/local/executor.go:66–79  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

64}
65
66func (m *modelPipeline) AddPipeline(id string) (*Pipeline, error) {
67 ctx, cancel := context.WithCancel(m.ctx)
68 pipeline := &Pipeline{
69 ctx: ctx,
70 cancel: cancel,
71 id: id,
72 channel: make(chan PullMessage, 10), // 带缓冲,防止阻塞
73 }
74 err := m.Set(id, pipeline)
75 if err != nil {
76 return nil, err
77 }
78 return pipeline, nil
79}
80
81func (m *modelPipeline) Close() {
82 m.cancel()

Callers 1

PullModelFunction · 0.80

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected