Update receiver README.md

This commit is contained in:
Thomas Roehl 2021-11-26 14:19:07 +01:00
parent 32d5a5b98f
commit 09e15c9949

View File

@ -9,6 +9,21 @@ The base class/configuration is located in `metricReceiver.go`.
# Installation
Nothing to do, all receivers are pure Go code
# Receiver configuration
```json
"receiver": {
"type": "nats",
"address": "nats://my-url"
"port" : "4222",
"database": "testcluster"
},
```
## `nats`
The receiver connects to `address` and `port` and subscribes itself for all messages with topic `database`. The default port is `4222`.
# Contributing own receivers
A receiver contains three functions and is derived from the type `Receiver` (in `metricReceiver.go`):
* `Init(config ReceiverConfig) error`