Documentation ¶
Index ¶
Constants ¶
View Source
const ( PingServiceHTTP clientutil.ServiceName = "ping-service-http" PingServiceGRPC clientutil.ServiceName = "ping-service-grpc" )
Variables ¶
This section is empty.
Functions ¶
func NewGRPCClient ¶
func NewGRPCClient(serviceAPIManager clientutil.ServiceAPIManager, rewriteServiceName ...clientutil.ServiceName) (pingservicev1.SrvPingClient, error)
NewGRPCClient ...
func NewHTTPClient ¶
func NewHTTPClient(serviceAPIManager clientutil.ServiceAPIManager, rewriteServiceName ...clientutil.ServiceName) (pingservicev1.SrvPingHTTPClient, error)
NewHTTPClient ...
Types ¶
type PingAPI ¶
type PingAPI interface {
Ping(ctx context.Context, req *pingroucesv1.PingReq) (*pingroucesv1.PingRespData, error)
}
PingAPI 仅供参考,建议在程序中直接使用 client.Ping(),然后 使用 apiutil.CheckAPIResponse(resp, err) 进行错误处理
func NewGRPCApi ¶
func NewGRPCApi(client pingservicev1.SrvPingClient) PingAPI
func NewHTTPApi ¶
func NewHTTPApi(client pingservicev1.SrvPingHTTPClient) PingAPI
Click to show internal directories.
Click to hide internal directories.