Register direct resolver for warden

pull/225/head
Jason C.H 6 years ago
parent c39d76128f
commit 6f024d0659
  1. 7
      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

Loading…
Cancel
Save