31 lines
409 B
Go
31 lines
409 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"log"
|
||
|
"strconv"
|
||
|
"strings"
|
||
|
"time"
|
||
|
|
||
|
"github.com/hashicorp/consul/api"
|
||
|
)
|
||
|
|
||
|
type Consul struct {
|
||
|
RedisTTL time.Duration
|
||
|
Timeout time.Duration
|
||
|
MaxError int
|
||
|
Influxdb string
|
||
|
Month string
|
||
|
Retention float64
|
||
|
MongoURI string
|
||
|
Database string
|
||
|
RedisURI string
|
||
|
}
|
||
|
|
||
|
func getClient() {
|
||
|
client, err := api.NewClient(api.DefaultConfig())
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|