sender

package
v0.0.0-...-d369a32 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	N      int64 // 有效发送次数
	NError int64 // 失败的次数
	NPause int64 // 没有发送的个数
)

发送计数

Functions

func Pause

func Pause(b bool)

Pause 设置是否暂停发送消息

func Register

func Register(name string, f creator)

Register 注册一种类型的消息分发器

func RetrySend

func RetrySend(msgType, title, msg string, users []string, from string, retry int) error

RetrySend send the message to crow service

func Send

func Send(msgType, title, msg string, users []string, from string) error

Send send the message to crow service

Types

type Sender

type Sender interface {
	Send(title, message, from string, to []string) (int, error)
}

Sender 表示一个消息发送器

func Build

func Build(senderType string, setting map[string]string) (Sender, error)

Build 初始化消息发送器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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