Documentation ¶
Index ¶
- func NewSmsLimiterService(cmd redis.Cmdable, svc SmsService) ratelimit.Limiter
- type FailOverService
- type LimiterService
- type MemoryService
- type SmsService
- func NewFailOverService(logger *zap.Logger, svcs []SmsService) SmsService
- func NewLimiterService(svc SmsService, limiter ratelimit.Limiter, logger *zap.Logger) SmsService
- func NewMemoryService(l *zap.Logger) SmsService
- func NewTencentSmsService(client *sms.Client, appId string, signature string) SmsService
- type TencentSmsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSmsLimiterService ¶
func NewSmsLimiterService(cmd redis.Cmdable, svc SmsService) ratelimit.Limiter
Types ¶
type FailOverService ¶
type FailOverService struct {
// contains filtered or unexported fields
}
type LimiterService ¶
type LimiterService struct {
// contains filtered or unexported fields
}
type MemoryService ¶
type MemoryService struct {
// contains filtered or unexported fields
}
type SmsService ¶
type SmsService interface {
Send(ctx context.Context, tplId string, args []string, numbers ...string) error
}
func NewFailOverService ¶
func NewFailOverService(logger *zap.Logger, svcs []SmsService) SmsService
func NewLimiterService ¶
func NewLimiterService(svc SmsService, limiter ratelimit.Limiter, logger *zap.Logger) SmsService
func NewMemoryService ¶
func NewMemoryService(l *zap.Logger) SmsService
func NewTencentSmsService ¶
func NewTencentSmsService(client *sms.Client, appId string, signature string) SmsService
Click to show internal directories.
Click to hide internal directories.