This commit is contained in:
lpf
2026-02-15 00:34:47 +08:00
parent 1e4bf34fac
commit 1ac0fb123b
3 changed files with 25 additions and 2 deletions

View File

@@ -45,6 +45,13 @@ func (c *BaseChannel) IsRunning() bool {
return c.running.Load()
}
func (c *BaseChannel) HealthCheck(ctx context.Context) error {
if !c.IsRunning() {
return fmt.Errorf("%s channel not running", c.name)
}
return nil
}
func (c *BaseChannel) IsAllowed(senderID string) bool {
if len(c.allowList) == 0 {
return true