38 lines
773 B
Markdown
38 lines
773 B
Markdown
# natstonotify
|
|
|
|
Small service which uses NATS to create notifications.
|
|
|
|
## Usage
|
|
|
|
```text
|
|
NAME:
|
|
natstonotify - NATS-powered notification service
|
|
|
|
USAGE:
|
|
natstonotify [global options] [command [command options]]
|
|
|
|
COMMANDS:
|
|
server Start the server
|
|
notify, n Send a notification
|
|
help, h Shows a list of commands or help for one command
|
|
|
|
GLOBAL OPTIONS:
|
|
--help, -h show help
|
|
```
|
|
|
|
## Message format
|
|
|
|
The services expects messages published to `home2rjusnet.notifications`.
|
|
|
|
The messages should contain the following as JSON.
|
|
|
|
```go
|
|
type BusNotification struct {
|
|
ID uint32 `json:"id,omitempty"`
|
|
Summary string `json:"summary"`
|
|
Body string `json:"body,omitempty"`
|
|
Timeout time.Duration `json:"timeout,omitempty"`
|
|
}
|
|
```
|
|
|