| 1 | package types |
| 2 | |
| 3 | import "context" |
| 4 | |
| 5 | // ContextSender is the interface for services that support context-aware sending. |
| 6 | // Services that implement this interface will receive the caller's context, |
| 7 | // enabling cancellation and deadline propagation. |
| 8 | type ContextSender interface { |
| 9 | SendContext(ctx context.Context, message string, params *Params) error |
| 10 | } |
| 11 | |
| 12 | // ContextAttachmentSender is the interface for services that support context-aware |
| 13 | // rich sending with structured message items. |
| 14 | type ContextAttachmentSender interface { |
| 15 | SendItemsContext(ctx context.Context, items []MessageItem, params Params) error |
| 16 | } |