Documentation ¶
Index ¶
- func NewMockClient(ctx context.Context, fun interface{}, s interface{}) (c mockClient, err error)
- type CliMethod
- type Client
- type Peer
- type Service
- func (s Service) AllInterfaces() (is []SvcMethod)
- func (s Service) Call(ctx context.Context, methodIdx uint32, req unsafe.Pointer) (resp unsafe.Pointer, err error)
- func (s Service) Callers() []codec.Caller
- func (s Service) Clone(ctx context.Context, rwc io.ReadWriteCloser, service interface{}) (sNew Service, err error)
- func (s Service) CloneCallers(service interface{}) []codec.Caller
- func (c Service) Close(ctx context.Context) (err error)
- func (s Service) MethodIdx(method string) (idx uint32, exist bool)
- type SvcMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockClient ¶
NewClient fun: pb.RegisterHelloServer(s *grpc.Server, srv HelloServer)
Types ¶
type Client ¶
func StartClient ¶
func StartClient(ctx context.Context, rwc io.ReadWriteCloser, fRegisters ...interface{}) (c Client, err error)
StartClient fRegister: pb.RegisterHelloServer(s *grpc.Server, srv HelloServer)
type Peer ¶
func StartPeer ¶
func StartPeer(ctx context.Context, rwc io.ReadWriteCloser, service interface{}, fRegisters ...interface{}) (rpc Peer, err error)
StartPeer fRegister: pb.RegisterHelloServer(rpc *grpc.Server, srv HelloServer)
type Service ¶
func StartService ¶
func StartService(ctx context.Context, rwc io.ReadWriteCloser, service interface{}, fRegisters ...interface{}) (s Service, err error)
StartService fRegister: pb.RegisterHelloService, service: implementation
func (Service) AllInterfaces ¶
func (Service) CloneCallers ¶
Click to show internal directories.
Click to hide internal directories.