Add README.md
This commit is contained in:
parent
d185802c65
commit
6ac9b1bb3a
37
README.md
Normal file
37
README.md
Normal file
@ -0,0 +1,37 @@
|
||||
# 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"`
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user