MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / subscribeRedisChannel

Function subscribeRedisChannel

internal/api/redis_queue_protocol.go:226–237  ·  view source on GitHub ↗
(channel string)

Source from the content-addressed store, hash-verified

224}
225
226func subscribeRedisChannel(channel string) (<-chan []byte, func(), bool) {
227 switch strings.ToLower(strings.TrimSpace(channel)) {
228 case redisUsageChannel:
229 messages, unsubscribe := redisqueue.SubscribeUsage()
230 return messages, unsubscribe, true
231 case redisErrorsChannel:
232 messages, unsubscribe := redisqueue.SubscribeErrors()
233 return messages, unsubscribe, true
234 default:
235 return nil, nil, false
236 }
237}
238
239func popRedisQueueItems(channel string, count int) ([][]byte, bool) {
240 switch strings.ToLower(strings.TrimSpace(channel)) {

Callers 1

handleRedisConnectionMethod · 0.85

Calls 2

SubscribeUsageFunction · 0.92
SubscribeErrorsFunction · 0.92

Tested by

no test coverage detected