proto

package
v0.0.0-...-2926792 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStreamServiceServer

func RegisterStreamServiceServer(s *grpc.Server, srv StreamServiceServer)

func RegisterStudentProtoServiceServer

func RegisterStudentProtoServiceServer(s *grpc.Server, srv StudentProtoServiceServer)

Types

type MyRequest

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

func (*MyRequest) Descriptor

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

func (*MyRequest) GetName

func (m *MyRequest) GetName() string

func (*MyRequest) ProtoMessage

func (*MyRequest) ProtoMessage()

func (*MyRequest) Reset

func (m *MyRequest) Reset()

func (*MyRequest) String

func (m *MyRequest) String() string

func (*MyRequest) XXX_DiscardUnknown

func (m *MyRequest) XXX_DiscardUnknown()

func (*MyRequest) XXX_Marshal

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

func (*MyRequest) XXX_Merge

func (m *MyRequest) XXX_Merge(src proto.Message)

func (*MyRequest) XXX_Size

func (m *MyRequest) XXX_Size() int

func (*MyRequest) XXX_Unmarshal

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

type MyResponse

type MyResponse struct {
	Realname             string   `protobuf:"bytes,2,opt,name=realname,proto3" json:"realname,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MyResponse) Descriptor

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

func (*MyResponse) GetRealname

func (m *MyResponse) GetRealname() string

func (*MyResponse) ProtoMessage

func (*MyResponse) ProtoMessage()

func (*MyResponse) Reset

func (m *MyResponse) Reset()

func (*MyResponse) String

func (m *MyResponse) String() string

func (*MyResponse) XXX_DiscardUnknown

func (m *MyResponse) XXX_DiscardUnknown()

func (*MyResponse) XXX_Marshal

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

func (*MyResponse) XXX_Merge

func (m *MyResponse) XXX_Merge(src proto.Message)

func (*MyResponse) XXX_Size

func (m *MyResponse) XXX_Size() int

func (*MyResponse) XXX_Unmarshal

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

type StreamPoint

type StreamPoint struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value                int32    `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StreamPoint) Descriptor

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

func (*StreamPoint) GetName

func (m *StreamPoint) GetName() string

func (*StreamPoint) GetValue

func (m *StreamPoint) GetValue() int32

func (*StreamPoint) ProtoMessage

func (*StreamPoint) ProtoMessage()

func (*StreamPoint) Reset

func (m *StreamPoint) Reset()

func (*StreamPoint) String

func (m *StreamPoint) String() string

func (*StreamPoint) XXX_DiscardUnknown

func (m *StreamPoint) XXX_DiscardUnknown()

func (*StreamPoint) XXX_Marshal

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

func (*StreamPoint) XXX_Merge

func (m *StreamPoint) XXX_Merge(src proto.Message)

func (*StreamPoint) XXX_Size

func (m *StreamPoint) XXX_Size() int

func (*StreamPoint) XXX_Unmarshal

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

type StreamRequest

type StreamRequest struct {
	Pt                   *StreamPoint `protobuf:"bytes,1,opt,name=pt,proto3" json:"pt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*StreamRequest) Descriptor

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

func (*StreamRequest) GetPt

func (m *StreamRequest) GetPt() *StreamPoint

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) Reset

func (m *StreamRequest) Reset()

func (*StreamRequest) String

func (m *StreamRequest) String() string

func (*StreamRequest) XXX_DiscardUnknown

func (m *StreamRequest) XXX_DiscardUnknown()

func (*StreamRequest) XXX_Marshal

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

func (*StreamRequest) XXX_Merge

func (m *StreamRequest) XXX_Merge(src proto.Message)

func (*StreamRequest) XXX_Size

func (m *StreamRequest) XXX_Size() int

func (*StreamRequest) XXX_Unmarshal

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

type StreamResponse

type StreamResponse struct {
	Pt                   *StreamPoint `protobuf:"bytes,1,opt,name=pt,proto3" json:"pt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*StreamResponse) Descriptor

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

func (*StreamResponse) GetPt

func (m *StreamResponse) GetPt() *StreamPoint

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) String

func (m *StreamResponse) String() string

func (*StreamResponse) XXX_DiscardUnknown

func (m *StreamResponse) XXX_DiscardUnknown()

func (*StreamResponse) XXX_Marshal

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

func (*StreamResponse) XXX_Merge

func (m *StreamResponse) XXX_Merge(src proto.Message)

func (*StreamResponse) XXX_Size

func (m *StreamResponse) XXX_Size() int

func (*StreamResponse) XXX_Unmarshal

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

type StreamServiceClient

type StreamServiceClient interface {
	// 服务器端流式 RPC
	List(ctx context.Context, in *StreamRequest, opts ...grpc.CallOption) (StreamService_ListClient, error)
	// 客户端流式 RPC
	Record(ctx context.Context, opts ...grpc.CallOption) (StreamService_RecordClient, error)
	// 双向流式 RPC
	Route(ctx context.Context, opts ...grpc.CallOption) (StreamService_RouteClient, error)
}

StreamServiceClient is the client API for StreamService service.

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

func NewStreamServiceClient

func NewStreamServiceClient(cc *grpc.ClientConn) StreamServiceClient

type StreamServiceServer

type StreamServiceServer interface {
	// 服务器端流式 RPC
	List(*StreamRequest, StreamService_ListServer) error
	// 客户端流式 RPC
	Record(StreamService_RecordServer) error
	// 双向流式 RPC
	Route(StreamService_RouteServer) error
}

StreamServiceServer is the server API for StreamService service.

type StreamService_ListClient

type StreamService_ListClient interface {
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type StreamService_ListServer

type StreamService_ListServer interface {
	Send(*StreamResponse) error
	grpc.ServerStream
}

type StreamService_RecordClient

type StreamService_RecordClient interface {
	Send(*StreamRequest) error
	CloseAndRecv() (*StreamResponse, error)
	grpc.ClientStream
}

type StreamService_RecordServer

type StreamService_RecordServer interface {
	SendAndClose(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type StreamService_RouteClient

type StreamService_RouteClient interface {
	Send(*StreamRequest) error
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type StreamService_RouteServer

type StreamService_RouteServer interface {
	Send(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type StudentProtoServiceClient

type StudentProtoServiceClient interface {
	GetName(ctx context.Context, in *MyRequest, opts ...grpc.CallOption) (*MyResponse, error)
}

StudentProtoServiceClient is the client API for StudentProtoService service.

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

func NewStudentProtoServiceClient

func NewStudentProtoServiceClient(cc *grpc.ClientConn) StudentProtoServiceClient

type StudentProtoServiceServer

type StudentProtoServiceServer interface {
	GetName(context.Context, *MyRequest) (*MyResponse, error)
}

StudentProtoServiceServer is the server API for StudentProtoService service.

type UnimplementedStreamServiceServer

type UnimplementedStreamServiceServer struct {
}

UnimplementedStreamServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedStreamServiceServer) List

func (*UnimplementedStreamServiceServer) Record

func (*UnimplementedStreamServiceServer) Route

type UnimplementedStudentProtoServiceServer

type UnimplementedStudentProtoServiceServer struct {
}

UnimplementedStudentProtoServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedStudentProtoServiceServer) GetName

Jump to

Keyboard shortcuts

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