Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartWorkerService ¶
func StartWorkerService(data *ServiceData) error
StartWorkerService starts the event queue listener service to listen for configured events return channel to track the finish event
to wait sync for the service to finish: fc, err := StartWorkerService(data) handle err <-fc // waits for finish
Types ¶
type EmailMaker ¶
EmailMaker prepares the email
type EmailRetriever ¶
EmailRetriever return the email by ID
type Locker ¶
type Locker interface { Lock(id string, lockKey string) error UnLock(id string, lockKey string, value *int) error }
Locker tracks email sending process It is used to quarantee not to send the emails twice
type ServiceData ¶
type ServiceData struct {
// contains filtered or unexported fields
}
ServiceData keeps data required for service work
Click to show internal directories.
Click to hide internal directories.