|
|
@@ -31,6 +31,10 @@ func NewDataService(config *Config) (*DataService, error) {
|
|
|
baseUrl := "http://" + config.Address + ":" + config.HttpPort
|
|
|
grpcAddress := config.Address + ":" + config.GrpcPort
|
|
|
|
|
|
+ if config.TimeoutSec == 0 {
|
|
|
+ config.TimeoutSec = 30
|
|
|
+ }
|
|
|
+
|
|
|
c := client.New(time.Duration(config.TimeoutSec) * time.Second)
|
|
|
|
|
|
namespaceInfos, err := c.GetNamespaces(config.Token, baseUrl,
|