protocol

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Request

type Request struct {
	RequestId   uint32            `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`      // 一次请求的唯一ID
	ServiceName string            `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // 服务名
	MethodName  string            `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"`    // 方法名
	Metadata    map[string][]byte ``                                                                                               // 传递的数据
	/* 157-byte string literal not displayed */
	Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` // body
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMetadata

func (x *Request) GetMetadata() map[string][]byte

func (*Request) GetMethodName

func (x *Request) GetMethodName() string

func (*Request) GetPayload

func (x *Request) GetPayload() []byte

func (*Request) GetRequestId

func (x *Request) GetRequestId() uint32

func (*Request) GetServiceName

func (x *Request) GetServiceName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	RetCode   uint32            `protobuf:"varint,1,opt,name=ret_code,json=retCode,proto3" json:"ret_code,omitempty"`       // 错误码   成功请求为 0
	RequestId uint32            `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 一次请求的唯一ID
	RetMsg    string            `protobuf:"bytes,3,opt,name=ret_msg,json=retMsg,proto3" json:"ret_msg,omitempty"`           // 错误消息  成功为success,错误会返回错误信息
	Metadata  map[string][]byte ``                                                                                          // 传递的数据
	/* 157-byte string literal not displayed */
	Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` // body
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMetadata

func (x *Response) GetMetadata() map[string][]byte

func (*Response) GetPayload

func (x *Response) GetPayload() []byte

func (*Response) GetRequestId

func (x *Response) GetRequestId() uint32

func (*Response) GetRetCode

func (x *Response) GetRetCode() uint32

func (*Response) GetRetMsg

func (x *Response) GetRetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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