style: kratos interface check (#2441)

* style: kratos interface check

* fix: kratos interface check
pull/2443/head
jesse.tang 2 years ago committed by GitHub
parent 8743f3e50c
commit c5e86ca36d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      contrib/registry/consul/registry.go
  2. 4
      contrib/registry/etcd/registry.go
  3. 4
      contrib/registry/eureka/register.go
  4. 4
      contrib/registry/zookeeper/register.go
  5. 12
      transport/grpc/balancer.go

@ -7,14 +7,14 @@ import (
"sync/atomic"
"time"
"github.com/go-kratos/kratos/v2/registry"
"github.com/hashicorp/consul/api"
"github.com/go-kratos/kratos/v2/registry"
)
var (
_ registry.Registrar = &Registry{}
_ registry.Discovery = &Registry{}
_ registry.Registrar = (*Registry)(nil)
_ registry.Discovery = (*Registry)(nil)
)
// Option is consul registry option.

@ -12,8 +12,8 @@ import (
)
var (
_ registry.Registrar = &Registry{}
_ registry.Discovery = &Registry{}
_ registry.Registrar = (*Registry)(nil)
_ registry.Discovery = (*Registry)(nil)
)
// Option is etcd registry option.

@ -11,8 +11,8 @@ import (
)
var (
_ registry.Registrar = &Registry{}
_ registry.Discovery = &Registry{}
_ registry.Registrar = (*Registry)(nil)
_ registry.Discovery = (*Registry)(nil)
)
type Option func(o *Registry)

@ -12,8 +12,8 @@ import (
)
var (
_ registry.Registrar = &Registry{}
_ registry.Discovery = &Registry{}
_ registry.Registrar = (*Registry)(nil)
_ registry.Discovery = (*Registry)(nil)
)
// Option is etcd registry option.

@ -1,13 +1,13 @@
package grpc
import (
"github.com/go-kratos/kratos/v2/registry"
"github.com/go-kratos/kratos/v2/selector"
"github.com/go-kratos/kratos/v2/transport"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/base"
"google.golang.org/grpc/metadata"
"github.com/go-kratos/kratos/v2/registry"
"github.com/go-kratos/kratos/v2/selector"
"github.com/go-kratos/kratos/v2/transport"
)
const (
@ -15,8 +15,8 @@ const (
)
var (
_ base.PickerBuilder = &balancerBuilder{}
_ balancer.Picker = &balancerPicker{}
_ base.PickerBuilder = (*balancerBuilder)(nil)
_ balancer.Picker = (*balancerPicker)(nil)
)
func init() {

Loading…
Cancel
Save