1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/orionis-coyotes

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
key.go 971 Байт
Копировать Редактировать Исходные данные Просмотреть построчно История
管宜尧 Отправлено 8 лет назад 60b80d7
package redis
import "fmt"
const (
taskQueueKey = "%s:tasks:queue"
taskQueueExecKey = taskQueueKey + ":exec"
taskDistinctKey = taskQueueKey + ":%s:dis"
taskPrepareKey = "task:prepare:queue"
taskChannelsKey = "task:channels"
)
// TaskQueueKey function return the key for task queue
func TaskQueueKey(channel string) string {
return fmt.Sprintf(taskQueueKey, channel)
}
// TaskQueueExecKey function return the key for the queue in execution
func TaskQueueExecKey(channel string) string {
return fmt.Sprintf(taskQueueExecKey, channel)
}
// TaskQueueDistinctKey function is used for distinct queue
func TaskQueueDistinctKey(channel string, command string) string {
return fmt.Sprintf(taskDistinctKey, channel, command)
}
// TaskPrepareQueueKey return the prepare key for queue
func TaskPrepareQueueKey() string {
return taskPrepareKey
}
// TaskChannelsKey return the key for channels storage
func TaskChannelsKey() string {
return taskChannelsKey
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/orionis-coyotes.git
git@gitlife.ru:oschina-mirror/orionis-coyotes.git
oschina-mirror
orionis-coyotes
orionis-coyotes
v1.0-beta