Documentation
¶
Index ¶
- type MessageService
- func (s *MessageService) Cancel(ctx context.Context, id int64, lease string) error
- func (s *MessageService) CleanUp(ctx context.Context) error
- func (s *MessageService) Complete(ctx context.Context, id int64, lease string) error
- func (s *MessageService) Consume(ctx context.Context, id int64, lease string) error
- func (s *MessageService) Create(ctx context.Context, message model.Message) (int64, error)
- func (s *MessageService) DeleteByID(ctx context.Context, id int64) error
- func (s *MessageService) Failed(ctx context.Context, id int64, lease string, data model.MessageAttr) error
- func (s *MessageService) GetByContent(ctx context.Context, content string) (model.Message, error)
- func (s *MessageService) GetByID(ctx context.Context, id int64) (model.Message, error)
- func (s *MessageService) GetCompletedAndFailed(ctx context.Context) ([]model.Message, error)
- func (s *MessageService) GetStale(ctx context.Context) ([]model.Message, error)
- func (s *MessageService) Heartbeat(ctx context.Context, id int64, data model.MessageAttr, lease string) error
- func (s *MessageService) List(ctx context.Context) ([]model.Message, error)
- func (s *MessageService) ResetToPending(ctx context.Context, id int64) error
- func (s *MessageService) UpdateByID(ctx context.Context, id int64, message model.Message) error
- func (s *MessageService) UpdatePriorityByID(ctx context.Context, id int64, priority int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(db *sql.DB, messageDao *dao.Message) *MessageService
func (*MessageService) DeleteByID ¶
func (s *MessageService) DeleteByID(ctx context.Context, id int64) error
func (*MessageService) Failed ¶
func (s *MessageService) Failed(ctx context.Context, id int64, lease string, data model.MessageAttr) error
func (*MessageService) GetByContent ¶
func (*MessageService) GetCompletedAndFailed ¶
func (*MessageService) Heartbeat ¶
func (s *MessageService) Heartbeat(ctx context.Context, id int64, data model.MessageAttr, lease string) error
func (*MessageService) ResetToPending ¶
func (s *MessageService) ResetToPending(ctx context.Context, id int64) error
func (*MessageService) UpdateByID ¶
func (*MessageService) UpdatePriorityByID ¶
Click to show internal directories.
Click to hide internal directories.