Documentation ¶
Index ¶
- func RegisterWriteServiceServer(s *grpc.Server, srv WriteServiceServer)
- type ClientRequest
- func (*ClientRequest) Descriptor() ([]byte, []int)
- func (m *ClientRequest) GetElkType() string
- func (m *ClientRequest) GetIndex() string
- func (m *ClientRequest) GetItem() *Profile
- func (*ClientRequest) ProtoMessage()
- func (m *ClientRequest) Reset()
- func (m *ClientRequest) String() string
- func (m *ClientRequest) XXX_DiscardUnknown()
- func (m *ClientRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientRequest) XXX_Merge(src proto.Message)
- func (m *ClientRequest) XXX_Size() int
- func (m *ClientRequest) XXX_Unmarshal(b []byte) error
- type ClientResponse
- func (*ClientResponse) Descriptor() ([]byte, []int)
- func (m *ClientResponse) GetReply() string
- func (*ClientResponse) ProtoMessage()
- func (m *ClientResponse) Reset()
- func (m *ClientResponse) String() string
- func (m *ClientResponse) XXX_DiscardUnknown()
- func (m *ClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientResponse) XXX_Merge(src proto.Message)
- func (m *ClientResponse) XXX_Size() int
- func (m *ClientResponse) XXX_Unmarshal(b []byte) error
- type Profile
- func (*Profile) Descriptor() ([]byte, []int)
- func (m *Profile) GetAge() string
- func (m *Profile) GetConstellation() string
- func (m *Profile) GetDegreeOfEducation() string
- func (m *Profile) GetHeight() string
- func (m *Profile) GetIncome() string
- func (m *Profile) GetMarriedOrNot() string
- func (m *Profile) GetName() string
- func (m *Profile) GetProfession() string
- func (m *Profile) GetProvince() string
- func (m *Profile) GetWeight() string
- func (m *Profile) GetWorkPlace() string
- func (*Profile) ProtoMessage()
- func (m *Profile) Reset()
- func (m *Profile) String() string
- func (m *Profile) XXX_DiscardUnknown()
- func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Profile) XXX_Merge(src proto.Message)
- func (m *Profile) XXX_Size() int
- func (m *Profile) XXX_Unmarshal(b []byte) error
- type UnimplementedWriteServiceServer
- type WriteServiceClient
- type WriteServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterWriteServiceServer ¶
func RegisterWriteServiceServer(s *grpc.Server, srv WriteServiceServer)
Types ¶
type ClientRequest ¶
type ClientRequest struct { Item *Profile `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` ElkType string `protobuf:"bytes,3,opt,name=elkType,proto3" json:"elkType,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
/ message 对应生成代码的 struct / 定义客户端请求的数据格式
func (*ClientRequest) Descriptor ¶
func (*ClientRequest) Descriptor() ([]byte, []int)
func (*ClientRequest) GetElkType ¶
func (m *ClientRequest) GetElkType() string
func (*ClientRequest) GetIndex ¶
func (m *ClientRequest) GetIndex() string
func (*ClientRequest) GetItem ¶
func (m *ClientRequest) GetItem() *Profile
func (*ClientRequest) ProtoMessage ¶
func (*ClientRequest) ProtoMessage()
func (*ClientRequest) Reset ¶
func (m *ClientRequest) Reset()
func (*ClientRequest) String ¶
func (m *ClientRequest) String() string
func (*ClientRequest) XXX_DiscardUnknown ¶
func (m *ClientRequest) XXX_DiscardUnknown()
func (*ClientRequest) XXX_Marshal ¶
func (m *ClientRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientRequest) XXX_Merge ¶
func (m *ClientRequest) XXX_Merge(src proto.Message)
func (*ClientRequest) XXX_Size ¶
func (m *ClientRequest) XXX_Size() int
func (*ClientRequest) XXX_Unmarshal ¶
func (m *ClientRequest) XXX_Unmarshal(b []byte) error
type ClientResponse ¶
type ClientResponse struct { Reply string `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
定义服务端响应的数据格式
func (*ClientResponse) Descriptor ¶
func (*ClientResponse) Descriptor() ([]byte, []int)
func (*ClientResponse) GetReply ¶
func (m *ClientResponse) GetReply() string
func (*ClientResponse) ProtoMessage ¶
func (*ClientResponse) ProtoMessage()
func (*ClientResponse) Reset ¶
func (m *ClientResponse) Reset()
func (*ClientResponse) String ¶
func (m *ClientResponse) String() string
func (*ClientResponse) XXX_DiscardUnknown ¶
func (m *ClientResponse) XXX_DiscardUnknown()
func (*ClientResponse) XXX_Marshal ¶
func (m *ClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientResponse) XXX_Merge ¶
func (m *ClientResponse) XXX_Merge(src proto.Message)
func (*ClientResponse) XXX_Size ¶
func (m *ClientResponse) XXX_Size() int
func (*ClientResponse) XXX_Unmarshal ¶
func (m *ClientResponse) XXX_Unmarshal(b []byte) error
type Profile ¶
type Profile struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` Province string `protobuf:"bytes,2,opt,name=Province,proto3" json:"Province,omitempty"` Age string `protobuf:"bytes,3,opt,name=Age,proto3" json:"Age,omitempty"` Constellation string `protobuf:"bytes,4,opt,name=Constellation,proto3" json:"Constellation,omitempty"` MarriedOrNot string `protobuf:"bytes,5,opt,name=MarriedOrNot,proto3" json:"MarriedOrNot,omitempty"` Height string `protobuf:"bytes,6,opt,name=Height,proto3" json:"Height,omitempty"` Profession string `protobuf:"bytes,7,opt,name=Profession,proto3" json:"Profession,omitempty"` Weight string `protobuf:"bytes,8,opt,name=Weight,proto3" json:"Weight,omitempty"` WorkPlace string `protobuf:"bytes,9,opt,name=WorkPlace,proto3" json:"WorkPlace,omitempty"` Income string `protobuf:"bytes,10,opt,name=Income,proto3" json:"Income,omitempty"` DegreeOfEducation string `protobuf:"bytes,11,opt,name=DegreeOfEducation,proto3" json:"DegreeOfEducation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Profile) Descriptor ¶
func (*Profile) GetConstellation ¶
func (*Profile) GetDegreeOfEducation ¶
func (*Profile) GetMarriedOrNot ¶
func (*Profile) GetProfession ¶
func (*Profile) GetProvince ¶
func (*Profile) GetWorkPlace ¶
func (*Profile) ProtoMessage ¶
func (*Profile) ProtoMessage()
func (*Profile) XXX_DiscardUnknown ¶
func (m *Profile) XXX_DiscardUnknown()
func (*Profile) XXX_Marshal ¶
func (*Profile) XXX_Unmarshal ¶
type UnimplementedWriteServiceServer ¶
type UnimplementedWriteServiceServer struct { }
UnimplementedWriteServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedWriteServiceServer) GrpcWrite ¶
func (*UnimplementedWriteServiceServer) GrpcWrite(ctx context.Context, req *ClientRequest) (*ClientResponse, error)
type WriteServiceClient ¶
type WriteServiceClient interface { // rpc 定义服务内的 GrpcWrite 远程调用 GrpcWrite(ctx context.Context, in *ClientRequest, opts ...grpc.CallOption) (*ClientResponse, error) }
WriteServiceClient is the client API for WriteService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewWriteServiceClient ¶
func NewWriteServiceClient(cc *grpc.ClientConn) WriteServiceClient
type WriteServiceServer ¶
type WriteServiceServer interface { // rpc 定义服务内的 GrpcWrite 远程调用 GrpcWrite(context.Context, *ClientRequest) (*ClientResponse, error) }
WriteServiceServer is the server API for WriteService service.
Click to show internal directories.
Click to hide internal directories.