Documentation ¶
Index ¶
- Constants
- Variables
- func AddLimiter(c *gin.Context)
- func CheckPoolExists(c *gin.Context)
- func CollectMetrics(c *gin.Context)
- func Consume(c *gin.Context)
- func Delete(c *gin.Context)
- func DeleteDeadLetter(c *gin.Context)
- func DeleteLimiter(c *gin.Context)
- func DeleteToken(c *gin.Context)
- func DestroyQueue(c *gin.Context)
- func EngineMetaInfo(c *gin.Context)
- func GetAccessLogStatus(c *gin.Context)
- func GetDeadLetterSize(c *gin.Context)
- func GetHTTPLogger(c *gin.Context) *logrus.Entry
- func GetLimiter(c *gin.Context)
- func ListLimiters(c *gin.Context)
- func ListPools(c *gin.Context)
- func ListTokens(c *gin.Context)
- func NewToken(c *gin.Context)
- func PProf(c *gin.Context)
- func PeekDeadLetter(c *gin.Context)
- func PeekJob(c *gin.Context)
- func PeekQueue(c *gin.Context)
- func PrometheusMetrics(c *gin.Context)
- func Publish(c *gin.Context)
- func PublishBulk(c *gin.Context)
- func RespawnDeadLetter(c *gin.Context)
- func SetLimiter(c *gin.Context)
- func Setup(l *logrus.Logger)
- func SetupParamDefaults(conf *config.Config)
- func SetupQueueEngine(c *gin.Context)
- func Size(c *gin.Context)
- func Throttle(action string) gin.HandlerFunc
- func UpdateAccessLogStatus(c *gin.Context)
- func ValidateMultiConsume(c *gin.Context)
- func ValidateParams(c *gin.Context)
- func ValidateToken(c *gin.Context)
- func Version(c *gin.Context)
- type PerformanceMetrics
Constants ¶
const ( ThrottleActionConsume = "consume" ThrottleActionProduce = "produce" )
Variables ¶
Functions ¶
func CheckPoolExists ¶ added in v1.0.4
func CollectMetrics ¶
func Consume ¶
GET /:namespace/:queue[,:queue]* @query:
- ttr: uint32
- timeout: uint32
- count: uint32
NOTE: according to RFC3986, the URL path part can contain comma(",") , so I decide to use "," as the separator of queue names
func DeleteDeadLetter ¶
DELETE /:namespace/:queue/deadletter Delete job(s) in the deadletter
func DestroyQueue ¶
func EngineMetaInfo ¶
GET /info?pool= List all namespaces and queues
func GetAccessLogStatus ¶
GetAccessLogStatus return whether the accesslog was enabled or not GET /accesslog
func GetDeadLetterSize ¶
GetDeadLetterSize return the size of dead letter GET /:namespace/:queue/deadletter/size
func PeekDeadLetter ¶
GET /:namespace/:queue/deadletter Get the first job in the deadletter
func PublishBulk ¶ added in v1.0.3
PUT /:namespace/:queue/bulk @query:
- delay: uint32
- ttl: uint32
- tries: uint16
func RespawnDeadLetter ¶
PUT /:namespace/:queue/deadletter Respawn job(s) in the deadletter
func SetupParamDefaults ¶
func SetupQueueEngine ¶
func Throttle ¶
func Throttle(action string) gin.HandlerFunc
func UpdateAccessLogStatus ¶
UpdateAccessLogStatus update the accesslog status POST /accesslog
func ValidateMultiConsume ¶
func ValidateParams ¶
Validate namespace and queue names don't contain any illegal characters
func ValidateToken ¶
Types ¶
type PerformanceMetrics ¶
type PerformanceMetrics struct { Latencies *prometheus.HistogramVec HTTPCodes *prometheus.CounterVec RateLimits *prometheus.CounterVec }