command
module
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Mar 13, 2025
License: MIT
Opens a new window with license information.
Imports: 28
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
使用golang实现的轻量级mq
支持功能
- 创建队列
CreateMq(mq string)
- 删除队列
DeleteMq(mq string)
- 清空队列
Drop(mq string)
- push消息
Push(mq string, msg string)
- pop消息
Pop(mq string, num int)
- 归档消息
Archive(mq string, id uint64)
- 读取消息并设置时间等待归档或删除,等待时间内该消息不会再被读取
Read(mq string, num int, timeout time.Duration)
- 删除消息
Delete(mq string, id uint64)
- 获取队列长度
Len(mq string) int
- 设置Key-Value
SetKeyValue(mq string, key string, value string, expire time.Duration)
- 获取Key-Value
GetKeyValue(mq string, key string)
- 删除Key-Value
DelKeyValue(mq string, key string)
使用
golang
go install github.com/Rehtt/mq@latest
mkdir ~/.config/mq
mq -path ~/.config/mq/
docker
docker run -d -p 1234:1234 -v data:/data ghcr.io/rehtt/mq:master
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.