Update Client documentation
* Added additional variable to fulfil NewUDPClient function requirement (there was one instead of 2) and it caused multiple-value client.NewUDPClient() in single-value context error * Update README.md Added error handling.pull/7637/head
parent
7106c8a9c9
commit
e0291e419b
|
@ -230,7 +230,10 @@ The **InfluxDB** client also supports writing over UDP.
|
||||||
```go
|
```go
|
||||||
func WriteUDP() {
|
func WriteUDP() {
|
||||||
// Make client
|
// Make client
|
||||||
c := client.NewUDPClient("localhost:8089")
|
c, err := client.NewUDPClient("localhost:8089")
|
||||||
|
if err != nil {
|
||||||
|
panic(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new point batch
|
// Create a new point batch
|
||||||
bp, _ := client.NewBatchPoints(client.BatchPointsConfig{
|
bp, _ := client.NewBatchPoints(client.BatchPointsConfig{
|
||||||
|
|
Loading…
Reference in New Issue