Refactor: Embed Init() into New() function

This commit is contained in:
Holger Obermaier
2022-02-23 15:15:17 +01:00
parent 3598aed090
commit 2f36375470
3 changed files with 28 additions and 40 deletions

View File

@@ -14,7 +14,6 @@ The configuration file for the receivers is a list of configurations. The `type`
}
```
## Type `nats`
```json
@@ -30,7 +29,6 @@ The `nats` receiver subscribes to the topic `database` and listens on `address`
# Contributing own receivers
A receiver contains a few functions and is derived from the type `Receiver` (in `metricReceiver.go`):
* `Init(name string, config json.RawMessage) error`
* `Start() error`
* `Close()`
* `Name() string`