Discover Packages
github.com/Rehtt/mq
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: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
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
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.