stub

package
v0.0.0-...-55b5bdd Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegsiterImpl

func RegsiterImpl(ctx context.Context, impl rpcDemo)

RegsiterImpl 后续通过code generate技术自动生成

Types

type RpcClient

type RpcClient struct {
	Conn net.Conn
}

func (RpcClient) Invoke

func (cli RpcClient) Invoke(ctx context.Context, req proto.Message, rsp proto.Message) (err error)

type RpcDemoStub

type RpcDemoStub struct {
	Client RpcClient
}

客户端代码

func (RpcDemoStub) Hello

func (stub RpcDemoStub) Hello(ctx context.Context, req *demo.HelloReq) (*demo.HelloRsp, error)

Jump to

Keyboard shortcuts

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