cron

package
v0.0.0-...-24b6552 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IMSmsWorkerChan  chan int
	MailWorkerChan   chan int
	PhoneWorkerChan  chan int
	WechatWorkerChan chan int
)
View Source
var HostMap = &SafeHostMap{M: make(map[string]string)}
View Source
var IMSender im.IM99U
View Source
var PhoneSender nexmo.Nexmo

Functions

func ConsumeIMSms

func ConsumeIMSms()

func ConsumeMail

func ConsumeMail()

func ConsumePhone

func ConsumePhone()

func ConsumeWechat

func ConsumeWechat()

func GetEndpoint

func GetEndpoint(content string) string

该函数可以搜索content,并从中提取 Endpoint: 后面跟的内容。判断依据是非数字字母下划线中划线

func InitWorker

func InitWorker()

func RecordAlarm

func RecordAlarm(recordMsg string)

func RecordPhoneAlarm

func RecordPhoneAlarm(recordMsg string)

func SendMail

func SendMail(mail *model.Mail)

sdp function of send mail mail acount set by cfg file

func SendMailList

func SendMailList(L []*model.Mail)

func SendPhone

func SendPhone(phone *model.Phone)

func SendPhoneList

func SendPhoneList(L []*model.Phone)

func SendSms

func SendSms(imsms *model.IMSms)

func SendSmsList

func SendSmsList(L []*model.IMSms)

func SendWechat

func SendWechat(sms *model.WechatSms)

func SendWechatList

func SendWechatList(L []*model.WechatSms)

func TransContent

func TransContent(content string) string

func UpdateHostMap

func UpdateHostMap()

Types

type ResponseHost

type ResponseHost struct {
	Ip       string `json:"ip,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
}

type SafeHostMap

type SafeHostMap struct {
	sync.Mutex
	M map[string]string
}

endpoint-ip kv

func (*SafeHostMap) GetHosts

func (this *SafeHostMap) GetHosts(url string)

func (*SafeHostMap) GetIP

func (this *SafeHostMap) GetIP(endpoint string) string

func (*SafeHostMap) GetIPByEndpoint

func (this *SafeHostMap) GetIPByEndpoint(endpoint string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL