updated as per the review comments

This commit is contained in:
MohitKatare-protean
2025-03-30 19:13:02 +05:30
parent 244a7be7c1
commit f0e39e34e7
35 changed files with 1605 additions and 124 deletions

View File

@@ -5,12 +5,10 @@ import "context"
// Publisher defines the general publisher interface for messaging plugins.
type Publisher interface {
// Publish sends a message (as a byte slice) using the underlying messaging system.
Publish(ctx context.Context, msg []byte) error
Close() error // Important for releasing resources.
Publish(context.Context, string, []byte) error
}
type PublisherProvider interface {
// New initializes a new publisher instance with the given configuration.
New(ctx context.Context, config map[string]string) (Publisher, error)
New(ctx context.Context, config map[string]string) (Publisher, func(), error)
}