package hubrpc

import (
	"gitlink.org.cn/cloudream/jcs-pub/common/pkgs/rpc"
	"google.golang.org/grpc"
)

type Client struct {
	addr     grpcAddr
	con      *grpc.ClientConn
	cli      HubClient
	pool     *Pool
	fusedErr *rpc.CodeError
}

func (c *Client) Release() {
	if c.con != nil {
		c.pool.release(c.addr)
	}
}

// 客户端的API要和服务端的API保持一致
var _ HubAPI = (*Client)(nil)
