sms

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AsyncPool added in v0.5.0

func AsyncPool() *goroutine.Pool

func PersistenceSmsJournal added in v0.5.0

func PersistenceSmsJournal()

func Query added in v0.4.0

func Query(queryId int64) []any

func SelectSession added in v0.4.0

func SelectSession(phone string) *session.Session

SelectSession 根据手机号码选择一个会话

func Send added in v0.4.0

func Send(message string, phones ...string) (queryId int64)

Send sms to phones return query id

func StartCacheExpireTicker added in v0.4.0

func StartCacheExpireTicker(asyncHandler func([]any))

StartCacheExpireTicker 过期数据定期检查器

Types

type ISP added in v0.4.0

type ISP string

func (ISP) Int added in v0.4.0

func (i ISP) Int() int

type SessionFactory added in v0.4.0

type SessionFactory struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func CreateSessionFactory added in v0.4.0

func CreateSessionFactory(isp string) *SessionFactory

CreateSessionFactory 创建或获取由isp指定的factory,isp需与sms.yml配置文件对应,否则会引起程序崩溃

func (*SessionFactory) Len added in v0.4.0

func (f *SessionFactory) Len() int

func (*SessionFactory) Less added in v0.4.0

func (f *SessionFactory) Less(i, j int) bool

func (*SessionFactory) PeekSession added in v0.4.0

func (f *SessionFactory) PeekSession() *session.Session

PeekSession 获取排序后在头部的会话(最近最少使用的会话)

func (*SessionFactory) Swap added in v0.4.0

func (f *SessionFactory) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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