Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel interface {
// Send 发送通知
Send(ctx context.Context, n notification.Notification) (notification.NotificationResponse, error)
}
func NewLarkCardChannel ¶
func NewLarkCardChannel(builder provider.SelectorBuilder) Channel
func NewLarkTextChannel ¶
func NewLarkTextChannel(builder provider.SelectorBuilder) Channel
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher 渠道分发器,对外伪装成Channel,作为统一入口
func NewDispatcher ¶
func NewDispatcher(channels map[notification.Channel]Channel) *Dispatcher
NewDispatcher 创建渠道分发器
func (*Dispatcher) Send ¶
func (d *Dispatcher) Send(ctx context.Context, n notification.Notification) (notification.NotificationResponse, error)
Click to show internal directories.
Click to hide internal directories.