pingapi

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

ping-service

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL