MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / release

Method release

fs/contube/memory.go:64–78  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

62}
63
64func (f *MemoryQueueFactory) release(name string) {
65 f.mu.Lock()
66 defer f.mu.Unlock()
67 q, ok := f.queues[name]
68 if !ok {
69 panic("release non-exist queue: " + name)
70 }
71 if atomic.AddInt32(&q.refCnt, -1) == 0 {
72 close(q.c)
73 delete(f.queues, name)
74 }
75 slog.InfoContext(f.ctx, "Released memory queue",
76 "current_use_count", atomic.LoadInt32(&q.refCnt),
77 "name", name)
78}
79
80func (f *MemoryQueueFactory) NewSourceTube(ctx context.Context, configMap ConfigMap) (<-chan Record, error) {
81 config := SourceQueueConfig{}

Callers 2

NewSourceTubeMethod · 0.95
NewSinkTubeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected