forked from absmach/supermq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOISSUE - Revert removal of notifier interface (absmach#2643)
Signed-off-by: Felix Gateru <[email protected]>
- Loading branch information
1 parent
6fd7e3d
commit 3a11b54
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Abstract Machines | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package consumers | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/absmach/supermq/pkg/messaging" | ||
) | ||
|
||
// ErrNotify wraps sending notification errors. | ||
var ErrNotify = errors.New("error sending notification") | ||
|
||
// Notifier represents an API for sending notification. | ||
// | ||
//go:generate mockery --name Notifier --output=./mocks --filename notifier.go --quiet --note "Copyright (c) Abstract Machines" | ||
type Notifier interface { | ||
// Notify method is used to send notification for the | ||
// received message to the provided list of receivers. | ||
Notify(from string, to []string, msg *messaging.Message) error | ||
} |