Documentation ¶
Index ¶
- Constants
- Variables
- type Result
- type Session
- func (s *Session) ActiveTest() error
- func (s *Session) AddCounter()
- func (s *Session) AddCounterN(n uint64)
- func (s *Session) Close()
- func (s *Session) HealthCheck() bool
- func (s *Session) LruPriority() uint64
- func (s *Session) ResetCounter()
- func (s *Session) Send(phone string, message string) []any
Constants ¶
View Source
const ( StatConnect stat = iota StatLogin StatClosing CMPP = "cmpp" SGIP = "sgip" SMGP = "smgp" )
Variables ¶
View Source
var MsgIdResultCacheMap sync.Map
MsgIdResultCacheMap 临时存储短信发送的返回结果数据,Key为msgId,value为*Result,后续采用数据库存储
View Source
var SequenceIdResultCacheMap sync.Map
SequenceIdResultCacheMap 临时存储短信发送的返回结果数据,Key为requestId,value为*Result,后续采用数据库存储
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { QueryId int64 `json:"QueryId"` // 给客户端用的查询编号 Phone string `json:"phone"` // 手机号 SequenceId uint32 `json:"sequenceId"` // 消息发送的标识 Result uint32 `json:"result"` // 消息发送的网关响应码 MsgId string `json:"msgId"` // 消息的msgId用于关联状态报告 Report string `json:"report"` // DELIVRD 等7直接状态码 SendTime time.Time `json:"sendTime"` // 发送时间 ResponseTime time.Time `json:"responseTime"` // 网关响应时间 ReportTime time.Time `json:"reportTime"` // 状态报告时间 }
type Session ¶
func NewSession ¶
NewSession 创建一个新会话并登录,且启动定时器和接收服务
func (*Session) ActiveTest ¶
func (*Session) AddCounter ¶
func (s *Session) AddCounter()
func (*Session) AddCounterN ¶
func (*Session) HealthCheck ¶
func (*Session) ResetCounter ¶
func (s *Session) ResetCounter()
Click to show internal directories.
Click to hide internal directories.