test

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWaiterServer

func RegisterWaiterServer(s *grpc.Server, srv WaiterServer)

Types

type Req

type Req struct {
	// 类型 字段 = 标识号
	JsonStr              string   `protobuf:"bytes,1,opt,name=jsonStr,proto3" json:"jsonStr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

定义 Req 消息结构

func (*Req) Descriptor

func (*Req) Descriptor() ([]byte, []int)

func (*Req) GetJsonStr

func (m *Req) GetJsonStr() string

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) Reset

func (m *Req) Reset()

func (*Req) String

func (m *Req) String() string

func (*Req) XXX_DiscardUnknown

func (m *Req) XXX_DiscardUnknown()

func (*Req) XXX_Marshal

func (m *Req) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Req) XXX_Merge

func (dst *Req) XXX_Merge(src proto.Message)

func (*Req) XXX_Size

func (m *Req) XXX_Size() int

func (*Req) XXX_Unmarshal

func (m *Req) XXX_Unmarshal(b []byte) error

type Res

type Res struct {
	BackJson             string   `protobuf:"bytes,1,opt,name=backJson,proto3" json:"backJson,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

定义 Res 消息结构

func (*Res) Descriptor

func (*Res) Descriptor() ([]byte, []int)

func (*Res) GetBackJson

func (m *Res) GetBackJson() string

func (*Res) ProtoMessage

func (*Res) ProtoMessage()

func (*Res) Reset

func (m *Res) Reset()

func (*Res) String

func (m *Res) String() string

func (*Res) XXX_DiscardUnknown

func (m *Res) XXX_DiscardUnknown()

func (*Res) XXX_Marshal

func (m *Res) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Res) XXX_Merge

func (dst *Res) XXX_Merge(src proto.Message)

func (*Res) XXX_Size

func (m *Res) XXX_Size() int

func (*Res) XXX_Unmarshal

func (m *Res) XXX_Unmarshal(b []byte) error

type WaiterClient

type WaiterClient interface {
	// 定义接口 (结构体可以复用)
	// 方法 (请求消息结构体) returns (返回消息结构体) {}
	DoMD5(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Res, error)
}

WaiterClient is the client API for Waiter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWaiterClient

func NewWaiterClient(cc *grpc.ClientConn) WaiterClient

type WaiterServer

type WaiterServer interface {
	// 定义接口 (结构体可以复用)
	// 方法 (请求消息结构体) returns (返回消息结构体) {}
	DoMD5(context.Context, *Req) (*Res, error)
}

WaiterServer is the server API for Waiter service.

Jump to

Keyboard shortcuts

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