* fix: modify interface check way * fix
@ -7,7 +7,7 @@ import (
clientv3 "go.etcd.io/etcd/client/v3"
)
var _ registry.Watcher = &watcher{}
var _ registry.Watcher = (*watcher)(nil)
type watcher struct {
key string
@ -82,7 +82,7 @@ type DataCenterInfo struct {
Class string `json:"@class"`
}
var _ APIInterface = new(Client)
var _ APIInterface = (*Client)(nil)
type APIInterface interface {
Register(ctx context.Context, ep Endpoint) error
@ -6,7 +6,7 @@ import (
"github.com/go-kratos/kratos/v2/registry"
ctx context.Context
@ -10,7 +10,7 @@ import (
"github.com/go-zookeeper/zk"
var ErrWatcherStopped = errors.New("watcher stopped")
@ -11,7 +11,7 @@ import (
"github.com/go-kratos/kratos/v2/transport"
var _ transport.Transporter = &Transport{}
var _ transport.Transporter = (*Transport)(nil)
type Transport struct {
kind transport.Kind
@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/otel/trace"
var _ transport.Transporter = &mockTransport{}
var _ transport.Transporter = (*mockTransport)(nil)
type headerCarrier http.Header
@ -17,7 +17,7 @@ const (
Name = "p2c"
var _ selector.Balancer = &Balancer{}
var _ selector.Balancer = (*Balancer)(nil)
// Option is random builder option.
type Option func(o *options)
@ -13,7 +13,7 @@ const (
Name = "random"
var _ selector.Balancer = &Balancer{} // Name is balancer name
var _ selector.Balancer = (*Balancer)(nil) // Name is balancer name
Name = "wrr"
"google.golang.org/grpc/metadata"
// Transport is a gRPC transport.
var _ Transporter = &Transport{}
var _ Transporter = (*Transport)(nil)
// Transporter is http Transporter
type Transporter interface {