|
|
@ -3,6 +3,8 @@ package warden |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"github.com/bilibili/kratos/pkg/net/rpc/warden/resolver" |
|
|
|
|
|
|
|
"github.com/bilibili/kratos/pkg/net/rpc/warden/resolver/direct" |
|
|
|
"net/url" |
|
|
|
"net/url" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
@ -51,6 +53,11 @@ func baseMetadata() metadata.MD { |
|
|
|
return gmd |
|
|
|
return gmd |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Register direct resolver by default to handle direct:// scheme.
|
|
|
|
|
|
|
|
func init() { |
|
|
|
|
|
|
|
resolver.Register(direct.New()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ClientConfig is rpc client conf.
|
|
|
|
// ClientConfig is rpc client conf.
|
|
|
|
type ClientConfig struct { |
|
|
|
type ClientConfig struct { |
|
|
|
Dial xtime.Duration |
|
|
|
Dial xtime.Duration |
|
|
|