Documentation ¶
Index ¶
- type AckInput
- type AckOutput
- type AckOutputBody
- type CreateQueueInput
- type CreateQueueInputBody
- type CreateQueueOutput
- type CreateQueueOutputBody
- type DeleteQueueInput
- type DeleteQueueOutput
- type DeleteQueueOutputBody
- type DequeueInput
- type DequeueOutput
- type DequeueOutputBody
- type EnqueueInput
- type EnqueueInputBody
- type EnqueueOutput
- type EnqueueOutputBody
- type Handler
- func (h *Handler) Ack(ctx context.Context, input *AckInput) (*AckOutput, error)
- func (h *Handler) ConfigureMiddleware(router *fiber.App)
- func (h *Handler) CreateQueue(ctx context.Context, input *CreateQueueInput) (*CreateQueueOutput, error)
- func (h *Handler) DeleteQueue(ctx context.Context, input *DeleteQueueInput) (*DeleteQueueOutput, error)
- func (h *Handler) Dequeue(ctx context.Context, input *DequeueInput) (*DequeueOutput, error)
- func (h *Handler) Enqueue(ctx context.Context, input *EnqueueInput) (*EnqueueOutput, error)
- func (h *Handler) Join(ctx context.Context, input *JoinInput) (*JoinOutput, error)
- func (h *Handler) Nack(ctx context.Context, input *NackInput) (*NackOutput, error)
- func (h *Handler) QueueInfo(ctx context.Context, input *QueueInfoInput) (*QueueInfoOutput, error)
- func (h *Handler) Queues(ctx context.Context, input *QueuesInput) (*QueuesOutput, error)
- func (h *Handler) RegisterRoutes(api huma.API)
- func (h *Handler) UpdatePriority(ctx context.Context, input *UpdatePriorityInput) (*UpdatePriorityOutput, error)
- type JoinInput
- type JoinOutput
- type NackInput
- type NackOutput
- type NackOutputBody
- type Node
- type Proxy
- func (p *Proxy) Ack(ctx context.Context, host string, queueName string, id uint64) (*AckOutputBody, huma.StatusError)
- func (p *Proxy) CreateQueue(ctx context.Context, host string, body *CreateQueueInputBody) (*CreateQueueOutputBody, huma.StatusError)
- func (p *Proxy) DeleteQueue(ctx context.Context, host string, queueName string) (*DeleteQueueOutputBody, huma.StatusError)
- func (p *Proxy) Dequeue(ctx context.Context, host string, queueName string, ack bool) (*DequeueOutputBody, huma.StatusError)
- func (p *Proxy) Enqueue(ctx context.Context, host string, queueName string, body *EnqueueInputBody) (*EnqueueOutputBody, huma.StatusError)
- func (p *Proxy) Nack(ctx context.Context, host string, queueName string, id uint64) (*NackOutputBody, huma.StatusError)
- func (p *Proxy) UpdatePriority(ctx context.Context, host string, queueName string, id uint64, ...) (*UpdatePriorityOutputBody, huma.StatusError)
- type QueueInfoInput
- type QueueInfoOutput
- type QueueInfoOutputBody
- type QueueOutput
- type QueuesInput
- type QueuesOutput
- type QueuesOutputBody
- type Service
- type UpdatePriorityInput
- type UpdatePriorityInputBody
- type UpdatePriorityOutput
- type UpdatePriorityOutputBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckOutput ¶
type AckOutput struct { Status int Body AckOutputBody }
type AckOutputBody ¶
type CreateQueueInput ¶
type CreateQueueInput struct {
Body CreateQueueInputBody
}
type CreateQueueInputBody ¶
type CreateQueueOutput ¶
type CreateQueueOutput struct { Status int Body CreateQueueOutputBody }
type CreateQueueOutputBody ¶
type CreateQueueOutputBody struct { Status string `json:"status" example:"CREATED" doc:"Status of the create operation"` Name string `json:"name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"` Type string `json:"type" enum:"delayed,fair" example:"delayed" doc:"Type of the queue"` }
type DeleteQueueInput ¶
type DeleteQueueInput struct {
QueueName string `path:"queue_name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"`
}
type DeleteQueueOutput ¶
type DeleteQueueOutput struct { Status int Body DeleteQueueOutputBody }
type DeleteQueueOutputBody ¶
type DeleteQueueOutputBody struct {
Status string `json:"status" example:"DELETED" doc:"Status of the delete operation"`
}
type DequeueInput ¶
type DequeueOutput ¶
type DequeueOutput struct { Status int Body DequeueOutputBody }
type DequeueOutputBody ¶
type DequeueOutputBody struct { Status string `json:"status" example:"DEQUEUED" doc:"Status of the dequeue operation"` ID string `json:"id" doc:"ID of the message"` Group string `json:"group,omitempty" default:"default" example:"customer-1" doc:"Group of the message"` Priority int64 `json:"priority" minimum:"0" example:"60" doc:"Priority of the message"` Content string `json:"content" example:"{\"user_id\": 1}" doc:"Content of the message"` }
type EnqueueInput ¶
type EnqueueInput struct { QueueName string `path:"queue_name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"` Body EnqueueInputBody }
type EnqueueInputBody ¶
type EnqueueInputBody struct { Group string `json:"group,omitempty" default:"default" example:"customer-1" doc:"Group of the message"` Priority int64 `json:"priority" minimum:"0" example:"60" doc:"Priority of the message"` Content string `json:"content" example:"{\"user_id\": 1}" doc:"Content of the message"` }
type EnqueueOutput ¶
type EnqueueOutput struct { Status int Body EnqueueOutputBody }
type EnqueueOutputBody ¶
type EnqueueOutputBody struct { Status string `json:"status" example:"ENQUEUED" doc:"Status of the enqueue operation"` ID string `json:"id" doc:"ID of the message"` Group string `json:"group,omitempty" default:"default" example:"customer-1" doc:"Group of the message"` Priority int64 `json:"priority" minimum:"0" example:"60" doc:"Priority of the message"` Content string `json:"content" example:"{\"user_id\": 1}" doc:"Content of the message"` }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) ConfigureMiddleware ¶
func (h *Handler) ConfigureMiddleware(router *fiber.App)
func (*Handler) CreateQueue ¶
func (h *Handler) CreateQueue(ctx context.Context, input *CreateQueueInput) (*CreateQueueOutput, error)
func (*Handler) DeleteQueue ¶
func (h *Handler) DeleteQueue(ctx context.Context, input *DeleteQueueInput) (*DeleteQueueOutput, error)
func (*Handler) Dequeue ¶
func (h *Handler) Dequeue(ctx context.Context, input *DequeueInput) (*DequeueOutput, error)
func (*Handler) Enqueue ¶
func (h *Handler) Enqueue(ctx context.Context, input *EnqueueInput) (*EnqueueOutput, error)
func (*Handler) QueueInfo ¶ added in v0.2.0
func (h *Handler) QueueInfo(ctx context.Context, input *QueueInfoInput) (*QueueInfoOutput, error)
func (*Handler) Queues ¶ added in v0.2.0
func (h *Handler) Queues(ctx context.Context, input *QueuesInput) (*QueuesOutput, error)
func (*Handler) RegisterRoutes ¶
func (h *Handler) RegisterRoutes(api huma.API)
func (*Handler) UpdatePriority ¶
func (h *Handler) UpdatePriority(ctx context.Context, input *UpdatePriorityInput) (*UpdatePriorityOutput, error)
type JoinOutput ¶ added in v0.1.11
type NackOutput ¶ added in v0.2.4
type NackOutput struct { Status int Body NackOutputBody }
type NackOutputBody ¶ added in v0.2.4
type Node ¶
type Node interface { Join(nodeID string, addr string) error PrometheusRegistry() prometheus.Registerer Leader() string IsLeader() bool GenerateID() uint64 CreateQueue(queueType, queueName string) error DeleteQueue(queueName string) error GetQueues() []*queue.QueueInfo GetQueueInfo(queueName string) (*queue.QueueInfo, error) Enqueue(queueName string, group string, priority int64, content string) (*queue.Message, error) Dequeue(QueueName string, ack bool) (*queue.Message, error) Ack(QueueName string, id uint64) error Nack(QueueName string, id uint64) error GetByID(id uint64) (*queue.Message, error) UpdatePriority(queueName string, id uint64, priority int64) error }
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) CreateQueue ¶
func (p *Proxy) CreateQueue( ctx context.Context, host string, body *CreateQueueInputBody, ) (*CreateQueueOutputBody, huma.StatusError)
func (*Proxy) DeleteQueue ¶
func (*Proxy) Enqueue ¶
func (p *Proxy) Enqueue(ctx context.Context, host string, queueName string, body *EnqueueInputBody) (*EnqueueOutputBody, huma.StatusError)
func (*Proxy) UpdatePriority ¶
func (p *Proxy) UpdatePriority( ctx context.Context, host string, queueName string, id uint64, body *UpdatePriorityInputBody, ) (*UpdatePriorityOutputBody, huma.StatusError)
type QueueInfoInput ¶ added in v0.2.0
type QueueInfoInput struct {
QueueName string `path:"queue_name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"`
}
type QueueInfoOutput ¶ added in v0.2.0
type QueueInfoOutput struct { Status int Body QueueInfoOutputBody }
type QueueInfoOutputBody ¶ added in v0.2.0
type QueueInfoOutputBody struct { Name string `json:"name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"` Type string `json:"type" enum:"delayed,fair" example:"delayed" doc:"Type of the queue"` EnqueueRPS float64 `json:"enqueue_rps" doc:"Rate of enqueued messages per second"` DequeueRPS float64 `json:"dequeue_rps" doc:"Rate of dequeued messages per second"` AckRPS float64 `json:"ack_rps" doc:"Rate of acknowledged messages per second"` NackRPS float64 `json:"nack_rps" doc:"Rate of unacknowledged messages per second"` Ready int64 `json:"ready" doc:"Number of ready messages"` Unacked int64 `json:"unacked" doc:"Number of unacknowledged messages"` Total int64 `json:"total" doc:"Total number of messages"` }
type QueueOutput ¶ added in v0.2.0
type QueueOutput struct { Name string `json:"name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"` Type string `json:"type" enum:"delayed,fair" example:"delayed" doc:"Type of the queue"` EnqueueRPS float64 `json:"enqueue_rps" doc:"Rate of enqueued messages per second"` DequeueRPS float64 `json:"dequeue_rps" doc:"Rate of dequeued messages per second"` AckRPS float64 `json:"ack_rps" doc:"Rate of acknowledged messages per second"` NackRPS float64 `json:"nack_rps" doc:"Rate of unacknowledged messages per second"` Ready int64 `json:"ready" doc:"Number of ready messages"` Unacked int64 `json:"unacked" doc:"Number of unacknowledged messages"` Total int64 `json:"total" doc:"Total number of messages"` }
type QueuesInput ¶ added in v0.2.0
type QueuesInput struct { }
type QueuesOutput ¶ added in v0.2.0
type QueuesOutput struct { Status int Body QueuesOutputBody }
type QueuesOutputBody ¶ added in v0.2.0
type QueuesOutputBody struct {
Queues []QueueOutput `json:"queues"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides HTTP service.
type UpdatePriorityInput ¶
type UpdatePriorityInput struct { QueueName string `path:"queue_name" maxLength:"1024" example:"user_indexing_queue" doc:"Name of the queue"` ID uint64 `path:"id" example:"123" doc:"ID of the message"` Body UpdatePriorityInputBody }
type UpdatePriorityInputBody ¶
type UpdatePriorityInputBody struct {
Priority int64 `json:"priority" minimum:"0" example:"60" doc:"Priority of the message"`
}
type UpdatePriorityOutput ¶
type UpdatePriorityOutput struct { Status int Body UpdatePriorityOutputBody }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.