You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
320 B
24 lines
320 B
package service
|
|
|
|
import (
|
|
"sendmsg/common"
|
|
"sendmsg/message"
|
|
)
|
|
|
|
type Service struct {
|
|
Body message.Body
|
|
}
|
|
|
|
func (s Service) Run() {
|
|
common.Log.Printf("[service] start excute...")
|
|
send(s.Body)
|
|
}
|
|
|
|
func send(body message.Body) {
|
|
m := message.GetType()
|
|
if m == nil || !message.Enabled() {
|
|
return
|
|
}
|
|
m.Send(body)
|
|
}
|