-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding basic (but flexible) notification system which hooks into logrus. #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This only adds e-mail notifications, but others could be easily done. In many cases, adding another existing logrus hook will be sufficient.
| } | ||
| } | ||
|
|
||
| func (n *Notifier) SendNotification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Notifier.SendNotification should have comment or be unexported
| return n | ||
| } | ||
|
|
||
| func (n *Notifier) StartNotification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Notifier.StartNotification should have comment or be unexported
| types []typeNotifier | ||
| } | ||
|
|
||
| func NewNotifier(c *cli.Context) *Notifier { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported function NewNotifier should have comment or be unexported
| SendNotification() | ||
| } | ||
|
|
||
| type Notifier struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type Notifier should have comment or be unexported
| } | ||
| } | ||
|
|
||
| func (n *Notifier) SendNotification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Notifier.SendNotification should have comment or be unexported
| return n | ||
| } | ||
|
|
||
| func (n *Notifier) StartNotification() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Notifier.StartNotification should have comment or be unexported
| types []typeNotifier | ||
| } | ||
|
|
||
| func NewNotifier(c *cli.Context) *Notifier { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported function NewNotifier should have comment or be unexported
| SendNotification() | ||
| } | ||
|
|
||
| type Notifier struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type Notifier should have comment or be unexported
|
Thanks so much for your contribution, really a nice addition to watchtower. I'll take a look into it in the next couple of days. |
cwildfoerster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
cwildfoerster - thanks, but I suspect stffabi or someone else with write access needs to also approve. |
|
@rdamazio thanks, LGTM. Would you have time to add some little documentation to the readme.md? |
|
hey, nice work! |
|
Done - see if this looks good. |
|
@rdamazio thanks again for your contribution. I'm merging it right now. |
|
@rdamazio great work. |
This only adds e-mail notifications, but others could be easily done. In
many cases, adding another existing logrus hook will be sufficient.