-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from treasure-data/dano/custom-notification-s…
…enders allow specifying custom notification senders
- Loading branch information
Showing
7 changed files
with
32 additions
and
22 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
2 changes: 1 addition & 1 deletion
2
...ag/core/agent/HttpNotificationSender.java → .../notification/HttpNotificationSender.java
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
2 changes: 1 addition & 1 deletion
2
...ag/core/agent/MailNotificationSender.java → .../notification/MailNotificationSender.java
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
21 changes: 21 additions & 0 deletions
21
digdag-core/src/main/java/io/digdag/core/notification/NotificationModule.java
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,21 @@ | ||
package io.digdag.core.notification; | ||
|
||
import com.google.inject.Binder; | ||
import com.google.inject.Module; | ||
import com.google.inject.Scopes; | ||
import com.google.inject.name.Names; | ||
import io.digdag.spi.NotificationSender; | ||
import io.digdag.spi.Notifier; | ||
|
||
public class NotificationModule | ||
implements Module | ||
{ | ||
@Override | ||
public void configure(Binder binder) | ||
{ | ||
binder.bind(NotificationSender.class).annotatedWith(Names.named("http")).to(HttpNotificationSender.class); | ||
binder.bind(NotificationSender.class).annotatedWith(Names.named("mail")).to(MailNotificationSender.class); | ||
binder.bind(NotificationSender.class).annotatedWith(Names.named("shell")).to(ShellNotificationSender.class); | ||
binder.bind(Notifier.class).to(DefaultNotifier.class).in(Scopes.SINGLETON); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...g/core/agent/ShellNotificationSender.java → ...notification/ShellNotificationSender.java
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