Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimerService ¶
type TimerService struct {
// contains filtered or unexported fields
}
func NewTimerService ¶
func NewTimerService(orderRequestSvc *order_request.OrderRequestService) *TimerService
NewTimerService creates a new instance of TimerService with the given order request service.
func (*TimerService) StartOrderRequestTimer ¶
func (s *TimerService) StartOrderRequestTimer(orderRequestID string, timeout time.Duration)
StartOrderRequestTimer sets a timer for an order request.
This method initiates a countdown for the specified order request ID. If the order request remains in the "Pending" status and is not claimed by any merchant (MerchantID is nil) by the end of the timeout duration, the order request will be automatically cancelled with a "Timeout" reason.
Params:
- orderRequestID (string): The ID of the order request to set the timer for.
- timeout (time.Duration): The duration after which the order request should be cancelled if unclaimed.
Click to show internal directories.
Click to hide internal directories.