Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeServerCons ¶
func ChangeServerCons(serverName string, servers []*server.ServiceInfo) ([]*grpc.ClientConn, error)
ChangeServerCons 改变服务的链接
func InitServerGrpcClient ¶
func InitServerGrpcClient(dis discover.Discover, config *registry.RegistryConfig)
创建客户端
Types ¶
type ConnGrpcClient ¶
type ConnGrpcClient struct {
// contains filtered or unexported fields
}
ConnGrpcClient 需要传入构建好的链接进行服务的调用
type GrpcClient ¶
type GrpcClient interface { //调用远程的服务 Call(serverName string, int interface{}, ctx context.Context, method string, result interface{}, params ...interface{}) error }
GrpcClient grpc 客户端
type ServerGrpcClient ¶
type ServerGrpcClient struct {
// contains filtered or unexported fields
}
ServerGrpcClient 服务使用的客户端
func BrianGrpcClient ¶
func BrianGrpcClient() (*ServerGrpcClient, error)
Click to show internal directories.
Click to hide internal directories.