From 6f024d0659bb1916bd502ee2f966c965d9b814cd Mon Sep 17 00:00:00 2001 From: "Jason C.H" Date: Sun, 21 Jul 2019 15:00:43 +0800 Subject: [PATCH] Register direct resolver for warden --- pkg/net/rpc/warden/client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/net/rpc/warden/client.go b/pkg/net/rpc/warden/client.go index 93b9262eb..d5e21dc88 100644 --- a/pkg/net/rpc/warden/client.go +++ b/pkg/net/rpc/warden/client.go @@ -3,6 +3,8 @@ package warden import ( "context" "fmt" + "github.com/bilibili/kratos/pkg/net/rpc/warden/resolver" + "github.com/bilibili/kratos/pkg/net/rpc/warden/resolver/direct" "net/url" "os" "strconv" @@ -51,6 +53,11 @@ func baseMetadata() metadata.MD { return gmd } +// Register direct resolver by default to handle direct:// scheme. +func init() { + resolver.Register(direct.New()) +} + // ClientConfig is rpc client conf. type ClientConfig struct { Dial xtime.Duration