(channel string)
| 224 | } |
| 225 | |
| 226 | func 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 | |
| 239 | func popRedisQueueItems(channel string, count int) ([][]byte, bool) { |
| 240 | switch strings.ToLower(strings.TrimSpace(channel)) { |
no test coverage detected