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) RegisterRoutes(api huma.API)
- func (h *Handler) UpdatePriority(ctx context.Context, input *UpdatePriorityInput) (*UpdatePriorityOutput, error)
- type JoinInput
- type JoinOutput
- 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) UpdatePriority(ctx context.Context, host string, queueName string, id uint64, ...) (*UpdatePriorityOutputBody, huma.StatusError)
- 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 uint64 `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 uint64 `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 (*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) RegisterRoutes ¶
func (*Handler) UpdatePriority ¶
func (h *Handler) UpdatePriority(ctx context.Context, input *UpdatePriorityInput) (*UpdatePriorityOutput, error)
type JoinOutput ¶ added in v0.1.11
type Node ¶
type Node interface {
Join(nodeID string, addr string) error
Leader() string
IsLeader() bool
GenerateID() uint64
CreateQueue(queueType, queueName string) error
DeleteQueue(queueName string) 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
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) Ack ¶
func (p *Proxy) Ack( ctx context.Context, host string, queueName string, id uint64, ) (*AckOutputBody, huma.StatusError)
func (*Proxy) CreateQueue ¶
func (p *Proxy) CreateQueue( ctx context.Context, host string, body *CreateQueueInputBody, ) (*CreateQueueOutputBody, huma.StatusError)
func (*Proxy) DeleteQueue ¶
func (p *Proxy) DeleteQueue( ctx context.Context, host string, queueName string, ) (*DeleteQueueOutputBody, huma.StatusError)
func (*Proxy) Dequeue ¶
func (p *Proxy) Dequeue( ctx context.Context, host string, queueName string, ack bool, ) (*DequeueOutputBody, huma.StatusError)
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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides HTTP service.
func NewHttpService ¶
New returns an uninitialized 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
}
Click to show internal directories.
Click to hide internal directories.