certFile:=flag.String("certFile","","location of the gNMI cert file (overwrites settings in config file)")
certFile:=flag.String("certFile","","location of the gNMI cert file (overwrites settings in config file)")
keyFile:=flag.String("keyFile","","location of the gNMI key file (overwrites settings in config file)")
keyFile:=flag.String("keyFile","","location of the gNMI key file (overwrites settings in config file)")
caFile:=flag.String("caFile","","location of the gNMI ca file (overwrites settings in config file)")
caFile:=flag.String("caFile","","location of the gNMI ca file (overwrites settings in config file)")
gRPCPassthrough:=flag.Bool("grpcPassthrough",true,"set the default resolve scheme for grpc to passthrough, default is true")
noGRPCPassthrough:=flag.Bool("noGRPCPassthrough",true,"set the default resolve scheme for grpc to not use passthrough, default is false")
flag.Parse()
flag.Parse()
if*gRPCPassthrough{
if*noGRPCPassthrough{
log.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.")
}else{
log.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.")
log.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.")
resolver.SetDefaultScheme("passthrough")
resolver.SetDefaultScheme("passthrough")
}else{
log.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.")
}
}
// parse string, this is built-in feature of logrus
// parse string, this is built-in feature of logrus
gRPCPassthrough:=flag.Bool("grpcPassthrough",true,"set the default resolve scheme for grpc to passthrough, default is true")
noGRPCPassthrough:=flag.Bool("noGRPCPassthrough",true,"set the default resolve scheme for grpc to not use passthrough, default is false")
flag.Parse()
flag.Parse()
if*gRPCPassthrough{
if*noGRPCPassthrough{
logrus.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.")
}else{
logrus.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.")
logrus.Info("Setting gRPC default resolver scheme to passthrough. No DNS queries are being made when doing a gRPC request.")
resolver.SetDefaultScheme("passthrough")
resolver.SetDefaultScheme("passthrough")
}else{
logrus.Info("gRPC default resolver scheme is not set to passthrough. This might cause issues with the gRPC connection when no real DNS server is available as each gRPC requests requires a DNS request.")