Documentation
¶
Index ¶
- Variables
- func RegisterMainServer(s grpc.ServiceRegistrar, srv MainServer)
- type AdvancedType
- func (*AdvancedType) Descriptor() ([]byte, []int)deprecated
- func (x *AdvancedType) GetBoolArray() []bool
- func (x *AdvancedType) GetFloat32Array() []float32
- func (x *AdvancedType) GetFloat64Array() []float64
- func (x *AdvancedType) GetHelloReplyMap() map[string]*HelloReply
- func (x *AdvancedType) GetInt32Array() []int32
- func (x *AdvancedType) GetInt64Array() []int64
- func (x *AdvancedType) GetStringArray() []string
- func (x *AdvancedType) GetUint32Array() []uint32
- func (x *AdvancedType) GetUint64Array() []uint64
- func (*AdvancedType) ProtoMessage()
- func (x *AdvancedType) ProtoReflect() protoreflect.Message
- func (x *AdvancedType) Reset()
- func (x *AdvancedType) String() string
- type BasicType
- func (*BasicType) Descriptor() ([]byte, []int)deprecated
- func (x *BasicType) GetBool() bool
- func (x *BasicType) GetFloat32() float32
- func (x *BasicType) GetFloat64() float64
- func (x *BasicType) GetInt32() int32
- func (x *BasicType) GetInt64() int64
- func (x *BasicType) GetString_() string
- func (x *BasicType) GetUint32() uint32
- func (x *BasicType) GetUint64() uint64
- func (*BasicType) ProtoMessage()
- func (x *BasicType) ProtoReflect() protoreflect.Message
- func (x *BasicType) Reset()
- func (x *BasicType) String() string
- type Empty
- type HelloReply
- type MainClient
- type MainServer
- type Main_BidStreamClient
- type Main_BidStreamServer
- type Main_ClientStreamClient
- type Main_ClientStreamServer
- type Main_ServerStreamClient
- type Main_ServerStreamServer
- type StreamMessage
- func (*StreamMessage) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMessage) GetExpectLen() int32
- func (x *StreamMessage) GetMsgID() int32
- func (*StreamMessage) ProtoMessage()
- func (x *StreamMessage) ProtoReflect() protoreflect.Message
- func (x *StreamMessage) Reset()
- func (x *StreamMessage) String() string
- type StreamMessageRepeated
- func (*StreamMessageRepeated) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMessageRepeated) GetData() []*StreamMessage
- func (*StreamMessageRepeated) ProtoMessage()
- func (x *StreamMessageRepeated) ProtoReflect() protoreflect.Message
- func (x *StreamMessageRepeated) Reset()
- func (x *StreamMessageRepeated) String() string
- type TestServer
- func (s *TestServer) BidStream(stream Main_BidStreamServer) error
- func (s *TestServer) ClientStream(stream Main_ClientStreamServer) error
- func (s *TestServer) ServerStream(msg *StreamMessageRepeated, stream Main_ServerStreamServer) error
- func (s *TestServer) TestAdvancedType(ctx context.Context, advancedType *AdvancedType) (*AdvancedType, error)
- func (s *TestServer) TestBasicType(ctx context.Context, baiscType *BasicType) (*BasicType, error)
- func (s *TestServer) Unary(ctx context.Context, _ *Empty) (*HelloReply, error)
- type UnimplementedMainServer
- func (UnimplementedMainServer) BidStream(Main_BidStreamServer) error
- func (UnimplementedMainServer) ClientStream(Main_ClientStreamServer) error
- func (UnimplementedMainServer) ServerStream(*StreamMessageRepeated, Main_ServerStreamServer) error
- func (UnimplementedMainServer) TestAdvancedType(context.Context, *AdvancedType) (*AdvancedType, error)
- func (UnimplementedMainServer) TestBasicType(context.Context, *BasicType) (*BasicType, error)
- func (UnimplementedMainServer) Unary(context.Context, *Empty) (*HelloReply, error)
- type UnsafeMainServer
Constants ¶
This section is empty.
Variables ¶
var File_pkg_runner_grpc_test_test_proto protoreflect.FileDescriptor
var Main_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpctest.Main", HandlerType: (*MainServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Unary", Handler: _Main_Unary_Handler, }, { MethodName: "TestBasicType", Handler: _Main_TestBasicType_Handler, }, { MethodName: "TestAdvancedType", Handler: _Main_TestAdvancedType_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ClientStream", Handler: _Main_ClientStream_Handler, ClientStreams: true, }, { StreamName: "ServerStream", Handler: _Main_ServerStream_Handler, ServerStreams: true, }, { StreamName: "BidStream", Handler: _Main_BidStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "pkg/runner/grpc_test/test.proto", }
Main_ServiceDesc is the grpc.ServiceDesc for Main service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMainServer ¶
func RegisterMainServer(s grpc.ServiceRegistrar, srv MainServer)
Types ¶
type AdvancedType ¶
type AdvancedType struct { Int32Array []int32 `protobuf:"varint,1,rep,packed,name=Int32Array,proto3" json:"Int32Array,omitempty"` Int64Array []int64 `protobuf:"varint,2,rep,packed,name=Int64Array,proto3" json:"Int64Array,omitempty"` Uint32Array []uint32 `protobuf:"varint,3,rep,packed,name=Uint32Array,proto3" json:"Uint32Array,omitempty"` Uint64Array []uint64 `protobuf:"varint,4,rep,packed,name=Uint64Array,proto3" json:"Uint64Array,omitempty"` Float32Array []float32 `protobuf:"fixed32,5,rep,packed,name=Float32Array,proto3" json:"Float32Array,omitempty"` Float64Array []float64 `protobuf:"fixed64,6,rep,packed,name=Float64Array,proto3" json:"Float64Array,omitempty"` StringArray []string `protobuf:"bytes,7,rep,name=StringArray,proto3" json:"StringArray,omitempty"` BoolArray []bool `protobuf:"varint,8,rep,packed,name=BoolArray,proto3" json:"BoolArray,omitempty"` HelloReplyMap map[string]*HelloReply `` /* 167-byte string literal not displayed */ // contains filtered or unexported fields }
func (*AdvancedType) Descriptor
deprecated
func (*AdvancedType) Descriptor() ([]byte, []int)
Deprecated: Use AdvancedType.ProtoReflect.Descriptor instead.
func (*AdvancedType) GetBoolArray ¶
func (x *AdvancedType) GetBoolArray() []bool
func (*AdvancedType) GetFloat32Array ¶
func (x *AdvancedType) GetFloat32Array() []float32
func (*AdvancedType) GetFloat64Array ¶
func (x *AdvancedType) GetFloat64Array() []float64
func (*AdvancedType) GetHelloReplyMap ¶
func (x *AdvancedType) GetHelloReplyMap() map[string]*HelloReply
func (*AdvancedType) GetInt32Array ¶
func (x *AdvancedType) GetInt32Array() []int32
func (*AdvancedType) GetInt64Array ¶
func (x *AdvancedType) GetInt64Array() []int64
func (*AdvancedType) GetStringArray ¶
func (x *AdvancedType) GetStringArray() []string
func (*AdvancedType) GetUint32Array ¶
func (x *AdvancedType) GetUint32Array() []uint32
func (*AdvancedType) GetUint64Array ¶
func (x *AdvancedType) GetUint64Array() []uint64
func (*AdvancedType) ProtoMessage ¶
func (*AdvancedType) ProtoMessage()
func (*AdvancedType) ProtoReflect ¶
func (x *AdvancedType) ProtoReflect() protoreflect.Message
func (*AdvancedType) Reset ¶
func (x *AdvancedType) Reset()
func (*AdvancedType) String ¶
func (x *AdvancedType) String() string
type BasicType ¶
type BasicType struct { Int32 int32 `protobuf:"varint,1,opt,name=Int32,proto3" json:"Int32,omitempty"` Int64 int64 `protobuf:"varint,2,opt,name=Int64,proto3" json:"Int64,omitempty"` Uint32 uint32 `protobuf:"varint,3,opt,name=Uint32,proto3" json:"Uint32,omitempty"` Uint64 uint64 `protobuf:"varint,4,opt,name=Uint64,proto3" json:"Uint64,omitempty"` Float32 float32 `protobuf:"fixed32,5,opt,name=Float32,proto3" json:"Float32,omitempty"` Float64 float64 `protobuf:"fixed64,6,opt,name=Float64,proto3" json:"Float64,omitempty"` String_ string `protobuf:"bytes,7,opt,name=String,proto3" json:"String,omitempty"` Bool bool `protobuf:"varint,8,opt,name=Bool,proto3" json:"Bool,omitempty"` // contains filtered or unexported fields }
func (*BasicType) Descriptor
deprecated
func (*BasicType) GetFloat32 ¶
func (*BasicType) GetFloat64 ¶
func (*BasicType) GetString_ ¶
func (*BasicType) ProtoMessage ¶
func (*BasicType) ProtoMessage()
func (*BasicType) ProtoReflect ¶
func (x *BasicType) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type MainClient ¶
type MainClient interface { Unary(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HelloReply, error) ClientStream(ctx context.Context, opts ...grpc.CallOption) (Main_ClientStreamClient, error) ServerStream(ctx context.Context, in *StreamMessageRepeated, opts ...grpc.CallOption) (Main_ServerStreamClient, error) BidStream(ctx context.Context, opts ...grpc.CallOption) (Main_BidStreamClient, error) TestBasicType(ctx context.Context, in *BasicType, opts ...grpc.CallOption) (*BasicType, error) TestAdvancedType(ctx context.Context, in *AdvancedType, opts ...grpc.CallOption) (*AdvancedType, error) }
MainClient is the client API for Main service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMainClient ¶
func NewMainClient(cc grpc.ClientConnInterface) MainClient
type MainServer ¶
type MainServer interface { Unary(context.Context, *Empty) (*HelloReply, error) ClientStream(Main_ClientStreamServer) error ServerStream(*StreamMessageRepeated, Main_ServerStreamServer) error BidStream(Main_BidStreamServer) error TestBasicType(context.Context, *BasicType) (*BasicType, error) TestAdvancedType(context.Context, *AdvancedType) (*AdvancedType, error) // contains filtered or unexported methods }
MainServer is the server API for Main service. All implementations must embed UnimplementedMainServer for forward compatibility
type Main_BidStreamClient ¶
type Main_BidStreamClient interface { Send(*StreamMessage) error Recv() (*StreamMessage, error) grpc.ClientStream }
type Main_BidStreamServer ¶
type Main_BidStreamServer interface { Send(*StreamMessage) error Recv() (*StreamMessage, error) grpc.ServerStream }
type Main_ClientStreamClient ¶
type Main_ClientStreamClient interface { Send(*StreamMessage) error CloseAndRecv() (*StreamMessageRepeated, error) grpc.ClientStream }
type Main_ClientStreamServer ¶
type Main_ClientStreamServer interface { SendAndClose(*StreamMessageRepeated) error Recv() (*StreamMessage, error) grpc.ServerStream }
type Main_ServerStreamClient ¶
type Main_ServerStreamClient interface { Recv() (*StreamMessage, error) grpc.ClientStream }
type Main_ServerStreamServer ¶
type Main_ServerStreamServer interface { Send(*StreamMessage) error grpc.ServerStream }
type StreamMessage ¶
type StreamMessage struct { MsgID int32 `protobuf:"varint,1,opt,name=MsgID,proto3" json:"MsgID,omitempty"` ExpectLen int32 `protobuf:"varint,2,opt,name=ExpectLen,proto3" json:"ExpectLen,omitempty"` // contains filtered or unexported fields }
func (*StreamMessage) Descriptor
deprecated
func (*StreamMessage) Descriptor() ([]byte, []int)
Deprecated: Use StreamMessage.ProtoReflect.Descriptor instead.
func (*StreamMessage) GetExpectLen ¶
func (x *StreamMessage) GetExpectLen() int32
func (*StreamMessage) GetMsgID ¶
func (x *StreamMessage) GetMsgID() int32
func (*StreamMessage) ProtoMessage ¶
func (*StreamMessage) ProtoMessage()
func (*StreamMessage) ProtoReflect ¶
func (x *StreamMessage) ProtoReflect() protoreflect.Message
func (*StreamMessage) Reset ¶
func (x *StreamMessage) Reset()
func (*StreamMessage) String ¶
func (x *StreamMessage) String() string
type StreamMessageRepeated ¶
type StreamMessageRepeated struct { Data []*StreamMessage `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*StreamMessageRepeated) Descriptor
deprecated
func (*StreamMessageRepeated) Descriptor() ([]byte, []int)
Deprecated: Use StreamMessageRepeated.ProtoReflect.Descriptor instead.
func (*StreamMessageRepeated) GetData ¶
func (x *StreamMessageRepeated) GetData() []*StreamMessage
func (*StreamMessageRepeated) ProtoMessage ¶
func (*StreamMessageRepeated) ProtoMessage()
func (*StreamMessageRepeated) ProtoReflect ¶
func (x *StreamMessageRepeated) ProtoReflect() protoreflect.Message
func (*StreamMessageRepeated) Reset ¶
func (x *StreamMessageRepeated) Reset()
func (*StreamMessageRepeated) String ¶
func (x *StreamMessageRepeated) String() string
type TestServer ¶
type TestServer struct {
UnimplementedMainServer
}
func (*TestServer) BidStream ¶
func (s *TestServer) BidStream(stream Main_BidStreamServer) error
func (*TestServer) ClientStream ¶
func (s *TestServer) ClientStream(stream Main_ClientStreamServer) error
func (*TestServer) ServerStream ¶
func (s *TestServer) ServerStream(msg *StreamMessageRepeated, stream Main_ServerStreamServer) error
func (*TestServer) TestAdvancedType ¶
func (s *TestServer) TestAdvancedType(ctx context.Context, advancedType *AdvancedType) (*AdvancedType, error)
func (*TestServer) TestBasicType ¶
func (*TestServer) Unary ¶
func (s *TestServer) Unary(ctx context.Context, _ *Empty) (*HelloReply, error)
type UnimplementedMainServer ¶
type UnimplementedMainServer struct { }
UnimplementedMainServer must be embedded to have forward compatible implementations.
func (UnimplementedMainServer) BidStream ¶
func (UnimplementedMainServer) BidStream(Main_BidStreamServer) error
func (UnimplementedMainServer) ClientStream ¶
func (UnimplementedMainServer) ClientStream(Main_ClientStreamServer) error
func (UnimplementedMainServer) ServerStream ¶
func (UnimplementedMainServer) ServerStream(*StreamMessageRepeated, Main_ServerStreamServer) error
func (UnimplementedMainServer) TestAdvancedType ¶
func (UnimplementedMainServer) TestAdvancedType(context.Context, *AdvancedType) (*AdvancedType, error)
func (UnimplementedMainServer) TestBasicType ¶
func (UnimplementedMainServer) Unary ¶
func (UnimplementedMainServer) Unary(context.Context, *Empty) (*HelloReply, error)
type UnsafeMainServer ¶
type UnsafeMainServer interface {
// contains filtered or unexported methods
}
UnsafeMainServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MainServer will result in compilation errors.