Documentation
¶
Index ¶
Constants ¶
View Source
const (
APP_NAME = "HelloService"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HelloRequest ¶
type HelloRequest struct {
MyName string `json:"my_name"`
}
type HelloResponse ¶
type HelloResponse struct {
Message string `json:"message"`
}
type HelloService ¶
type HelloService interface {
RPCHello(context.Context, *HelloRequest) (*HelloResponse, error)
}
func NewClient ¶
func NewClient(address string) (HelloService, error)
type HelloServiceClient ¶
type HelloServiceClient struct {
// contains filtered or unexported fields
}
要封装原始的 不友好的rpc call
func (*HelloServiceClient) RPCHello ¶ added in v2.0.82
func (c *HelloServiceClient) RPCHello(ctx context.Context, in *HelloRequest) (*HelloResponse, error)
Click to show internal directories.
Click to hide internal directories.