Documentation
¶
Index ¶
Constants ¶
View Source
const ( RESTClientType = "rest" RPCClientType = "rpc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Type 返回客户端类型(rest/rpc)
Type() string
// Close 关闭客户端
Close(ctx context.Context) error
}
Client 统一的客户端接口
type RESTClient ¶
RESTClient REST客户端接口,继承统一接口
type RESTConfig ¶
type RESTConfig struct {
Type string // "http" or "fasthttp"
BaseURL string
Options []rest.ClientOption
}
RESTConfig REST客户端配置
type RPCConfig ¶
type RPCConfig struct {
Method string // "grpc"
Options []rpc.ClientOptions
}
RPCConfig RPC客户端配置
Click to show internal directories.
Click to hide internal directories.