feat: use robot to migrate code

Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
This commit is contained in:
kubbot & kubecub
2023-06-30 09:45:02 +08:00
parent 2d41819008
commit 539e0fdfb6
529 changed files with 64588 additions and 54413 deletions
@@ -0,0 +1,25 @@
package discoveryregistry
import (
"context"
"google.golang.org/grpc"
"google.golang.org/grpc/resolver"
)
type Conn interface {
GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error)
GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, error)
AddOption(opts ...grpc.DialOption)
CloseConn(conn grpc.ClientConnInterface)
// do not use this method for call rpc
GetClientLocalConns() map[string][]resolver.Address
}
type SvcDiscoveryRegistry interface {
Conn
Register(serviceName, host string, port int, opts ...grpc.DialOption) error
UnRegister() error
RegisterConf2Registry(key string, conf []byte) error
GetConfFromRegistry(key string) ([]byte, error)
}