-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NATS publisher support to reminder (#4829)
* Minor cleanup work Signed-off-by: Vyom Yadav <[email protected]> * Add NATS publisher support to reminder Signed-off-by: Vyom Yadav <[email protected]> --------- Signed-off-by: Vyom Yadav <[email protected]>
- Loading branch information
1 parent
04ac00a
commit a6d9b22
Showing
8 changed files
with
109 additions
and
98 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
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
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 @@ | ||
// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package reminder | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/ThreeDotsLabs/watermill/message" | ||
|
||
"github.com/mindersec/minder/pkg/eventer" | ||
) | ||
|
||
func (r *reminder) getMessagePublisher(ctx context.Context) (message.Publisher, error) { | ||
pub, err := eventer.New(ctx, nil, &r.cfg.EventConfig) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to create publisher: %w", err) | ||
} | ||
|
||
return pub, nil | ||
} |
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
This file was deleted.
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
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
This file was deleted.
Oops, something went wrong.