mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-07 21:37:33 +08:00
guard non-send message actions by channel capability
This commit is contained in:
@@ -20,6 +20,11 @@ type Channel interface {
|
||||
HealthCheck(ctx context.Context) error
|
||||
}
|
||||
|
||||
// ActionCapable is an optional capability interface for channels that support non-send message actions.
|
||||
type ActionCapable interface {
|
||||
SupportsAction(action string) bool
|
||||
}
|
||||
|
||||
type BaseChannel struct {
|
||||
config interface{}
|
||||
bus *bus.MessageBus
|
||||
|
||||
Reference in New Issue
Block a user