Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConn ¶
func NewConn(api, grpcAddress string) *grpc.ClientConn
grpcAddress 可以为空,表示使用 api 同一地址。 TODO 私有化,并把 token 设置到 default call options
Types ¶
type Client ¶
type Client interface { proto.UtilsClient proto.TaoBlogClient proto.ManagementClient proto.SearchClient }
func NewFromGrpcAddr ¶
type ProtoClient ¶
type ProtoClient struct { Utils proto.UtilsClient Blog proto.TaoBlogClient Management proto.ManagementClient Search proto.SearchClient // contains filtered or unexported fields }
func NewProtoClient ¶
func NewProtoClient(cc *grpc.ClientConn, token string) *ProtoClient
func (*ProtoClient) Context ¶
func (c *ProtoClient) Context() context.Context
Click to show internal directories.
Click to hide internal directories.