Documentation
¶
Index ¶
- type CancelRequest
- type CompletedRequest
- type ConsumeRequest
- type Error
- type FailedRequest
- type HeartbeatRequest
- type MessageController
- func (mc *MessageController) Cancel(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Complete(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Consume(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Create(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Failed(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Get(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) Heartbeat(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) List(req *restful.Request, resp *restful.Response)
- func (mc *MessageController) RegisterRoutes(ws *restful.WebService)
- func (mc *MessageController) Schedule(ctx context.Context, logger *slog.Logger)
- type MessageRequest
- type MessageResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelRequest ¶
type CancelRequest struct {
Lease string `json:"lease"`
}
type CompletedRequest ¶
type CompletedRequest struct {
Lease string `json:"lease"`
}
type ConsumeRequest ¶
type ConsumeRequest struct {
Lease string `json:"lease"`
}
type FailedRequest ¶
type FailedRequest struct { Lease string `json:"lease"` Data model.MessageAttr `json:"data"` }
type HeartbeatRequest ¶
type HeartbeatRequest struct { Data model.MessageAttr `json:"data"` Lease string `json:"lease"` }
type MessageController ¶
type MessageController struct {
// contains filtered or unexported fields
}
func NewMessageController ¶
func NewMessageController(messageService *service.MessageService) *MessageController
func (*MessageController) Cancel ¶
func (mc *MessageController) Cancel(req *restful.Request, resp *restful.Response)
func (*MessageController) Complete ¶
func (mc *MessageController) Complete(req *restful.Request, resp *restful.Response)
func (*MessageController) Consume ¶
func (mc *MessageController) Consume(req *restful.Request, resp *restful.Response)
func (*MessageController) Create ¶
func (mc *MessageController) Create(req *restful.Request, resp *restful.Response)
func (*MessageController) Failed ¶
func (mc *MessageController) Failed(req *restful.Request, resp *restful.Response)
func (*MessageController) Get ¶
func (mc *MessageController) Get(req *restful.Request, resp *restful.Response)
func (*MessageController) Heartbeat ¶
func (mc *MessageController) Heartbeat(req *restful.Request, resp *restful.Response)
func (*MessageController) List ¶
func (mc *MessageController) List(req *restful.Request, resp *restful.Response)
func (*MessageController) RegisterRoutes ¶
func (mc *MessageController) RegisterRoutes(ws *restful.WebService)
type MessageRequest ¶
type MessageRequest struct { Content string `json:"content"` Priority int `json:"priority"` Data model.MessageAttr `json:"data,omitempty"` }
type MessageResponse ¶
type MessageResponse struct { MessageID int64 `json:"id"` Content string `json:"content"` Priority int `json:"priority"` Status model.MessageStatus `json:"status"` Data model.MessageAttr `json:"data,omitempty"` LastHeartbeat time.Time `json:"last_heartbeat"` }
Click to show internal directories.
Click to hide internal directories.