mirror of
https://github.com/openziti/zrok.git
synced 2026-08-24 10:14:56 -05:00
additional logging
This commit is contained in:
@@ -33,6 +33,7 @@ func NewAgentController(cfg *Config) (*Controller, error) {
|
||||
func (ctrl *Controller) NewClient(serviceName string) (client agentGrpc.AgentClient, conn *grpc.ClientConn, err error) {
|
||||
opts := []grpc.DialOption{
|
||||
grpc.WithContextDialer(func(_ context.Context, addr string) (net.Conn, error) {
|
||||
logrus.Warnf("dialing '%v'", addr)
|
||||
conn, err := ctrl.zCtx.DialWithOptions(addr, &ziti.DialOptions{ConnectTimeout: 30 * time.Second})
|
||||
if err != nil {
|
||||
logrus.Warnf("initial dial failed; refreshing service '%v'", addr)
|
||||
@@ -45,6 +46,7 @@ func (ctrl *Controller) NewClient(serviceName string) (client agentGrpc.AgentCli
|
||||
}
|
||||
return conn, nil
|
||||
}
|
||||
logrus.Warnf("returning success from initial dial for '%v'", addr)
|
||||
return conn, nil
|
||||
}),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
|
||||
Reference in New Issue
Block a user