Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
- type ChatRequest
- type ChatResponse
- type GreeterServiceClient
- type GreeterServiceServer
- type GreeterService_ChatClient
- type GreeterService_ChatServer
- type GreeterService_ListGreetingsClient
- type GreeterService_ListGreetingsServer
- type GreeterService_RecordGreetingsClient
- type GreeterService_RecordGreetingsServer
- type ListGreetingsRequest
- func (*ListGreetingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListGreetingsRequest) GetCount() int64
- func (*ListGreetingsRequest) ProtoMessage()
- func (x *ListGreetingsRequest) ProtoReflect() protoreflect.Message
- func (x *ListGreetingsRequest) Reset()
- func (x *ListGreetingsRequest) String() string
- type ListGreetingsResponse
- func (*ListGreetingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListGreetingsResponse) GetMessage() string
- func (*ListGreetingsResponse) ProtoMessage()
- func (x *ListGreetingsResponse) ProtoReflect() protoreflect.Message
- func (x *ListGreetingsResponse) Reset()
- func (x *ListGreetingsResponse) String() string
- type RecordGreetingsRequest
- func (*RecordGreetingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RecordGreetingsRequest) GetMessage() string
- func (*RecordGreetingsRequest) ProtoMessage()
- func (x *RecordGreetingsRequest) ProtoReflect() protoreflect.Message
- func (x *RecordGreetingsRequest) Reset()
- func (x *RecordGreetingsRequest) String() string
- type RecordGreetingsResponse
- func (*RecordGreetingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RecordGreetingsResponse) GetCount() int64
- func (*RecordGreetingsResponse) ProtoMessage()
- func (x *RecordGreetingsResponse) ProtoReflect() protoreflect.Message
- func (x *RecordGreetingsResponse) Reset()
- func (x *RecordGreetingsResponse) String() string
- type SayHelloRequest
- type SayHelloResponse
- type UnimplementedGreeterServiceServer
- func (UnimplementedGreeterServiceServer) Chat(GreeterService_ChatServer) error
- func (UnimplementedGreeterServiceServer) ListGreetings(*ListGreetingsRequest, GreeterService_ListGreetingsServer) error
- func (UnimplementedGreeterServiceServer) RecordGreetings(GreeterService_RecordGreetingsServer) error
- func (UnimplementedGreeterServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
- type UnsafeGreeterServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_grpc_examples_helloworld_v1_helloworld_proto protoreflect.FileDescriptor
var GreeterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.v1.GreeterService", HandlerType: (*GreeterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _GreeterService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListGreetings", Handler: _GreeterService_ListGreetings_Handler, ServerStreams: true, }, { StreamName: "RecordGreetings", Handler: _GreeterService_RecordGreetings_Handler, ClientStreams: true, }, { StreamName: "Chat", Handler: _GreeterService_Chat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "grpc/examples/helloworld/v1/helloworld.proto", }
GreeterService_ServiceDesc is the grpc.ServiceDesc for GreeterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterServiceServer ¶
func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)
Types ¶
type ChatRequest ¶
type ChatRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ChatRequest) Descriptor
deprecated
func (*ChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.
func (*ChatRequest) GetMessage ¶
func (x *ChatRequest) GetMessage() string
func (*ChatRequest) ProtoMessage ¶
func (*ChatRequest) ProtoMessage()
func (*ChatRequest) ProtoReflect ¶
func (x *ChatRequest) ProtoReflect() protoreflect.Message
func (*ChatRequest) Reset ¶
func (x *ChatRequest) Reset()
func (*ChatRequest) String ¶
func (x *ChatRequest) String() string
type ChatResponse ¶
type ChatResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ChatResponse) Descriptor
deprecated
func (*ChatResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.
func (*ChatResponse) GetMessage ¶
func (x *ChatResponse) GetMessage() string
func (*ChatResponse) ProtoMessage ¶
func (*ChatResponse) ProtoMessage()
func (*ChatResponse) ProtoReflect ¶
func (x *ChatResponse) ProtoReflect() protoreflect.Message
func (*ChatResponse) Reset ¶
func (x *ChatResponse) Reset()
func (*ChatResponse) String ¶
func (x *ChatResponse) String() string
type GreeterServiceClient ¶
type GreeterServiceClient interface { // Sends a greeting SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) ListGreetings(ctx context.Context, in *ListGreetingsRequest, opts ...grpc.CallOption) (GreeterService_ListGreetingsClient, error) RecordGreetings(ctx context.Context, opts ...grpc.CallOption) (GreeterService_RecordGreetingsClient, error) Chat(ctx context.Context, opts ...grpc.CallOption) (GreeterService_ChatClient, error) }
GreeterServiceClient is the client API for GreeterService 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 NewGreeterServiceClient ¶
func NewGreeterServiceClient(cc grpc.ClientConnInterface) GreeterServiceClient
type GreeterServiceServer ¶
type GreeterServiceServer interface { // Sends a greeting SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) ListGreetings(*ListGreetingsRequest, GreeterService_ListGreetingsServer) error RecordGreetings(GreeterService_RecordGreetingsServer) error Chat(GreeterService_ChatServer) error // contains filtered or unexported methods }
GreeterServiceServer is the server API for GreeterService service. All implementations must embed UnimplementedGreeterServiceServer for forward compatibility
type GreeterService_ChatClient ¶
type GreeterService_ChatClient interface { Send(*ChatRequest) error Recv() (*ChatResponse, error) grpc.ClientStream }
type GreeterService_ChatServer ¶
type GreeterService_ChatServer interface { Send(*ChatResponse) error Recv() (*ChatRequest, error) grpc.ServerStream }
type GreeterService_ListGreetingsClient ¶
type GreeterService_ListGreetingsClient interface { Recv() (*ListGreetingsResponse, error) grpc.ClientStream }
type GreeterService_ListGreetingsServer ¶
type GreeterService_ListGreetingsServer interface { Send(*ListGreetingsResponse) error grpc.ServerStream }
type GreeterService_RecordGreetingsClient ¶
type GreeterService_RecordGreetingsClient interface { Send(*RecordGreetingsRequest) error CloseAndRecv() (*RecordGreetingsResponse, error) grpc.ClientStream }
type GreeterService_RecordGreetingsServer ¶
type GreeterService_RecordGreetingsServer interface { SendAndClose(*RecordGreetingsResponse) error Recv() (*RecordGreetingsRequest, error) grpc.ServerStream }
type ListGreetingsRequest ¶
type ListGreetingsRequest struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ListGreetingsRequest) Descriptor
deprecated
func (*ListGreetingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListGreetingsRequest.ProtoReflect.Descriptor instead.
func (*ListGreetingsRequest) GetCount ¶
func (x *ListGreetingsRequest) GetCount() int64
func (*ListGreetingsRequest) ProtoMessage ¶
func (*ListGreetingsRequest) ProtoMessage()
func (*ListGreetingsRequest) ProtoReflect ¶
func (x *ListGreetingsRequest) ProtoReflect() protoreflect.Message
func (*ListGreetingsRequest) Reset ¶
func (x *ListGreetingsRequest) Reset()
func (*ListGreetingsRequest) String ¶
func (x *ListGreetingsRequest) String() string
type ListGreetingsResponse ¶
type ListGreetingsResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ListGreetingsResponse) Descriptor
deprecated
func (*ListGreetingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListGreetingsResponse.ProtoReflect.Descriptor instead.
func (*ListGreetingsResponse) GetMessage ¶
func (x *ListGreetingsResponse) GetMessage() string
func (*ListGreetingsResponse) ProtoMessage ¶
func (*ListGreetingsResponse) ProtoMessage()
func (*ListGreetingsResponse) ProtoReflect ¶
func (x *ListGreetingsResponse) ProtoReflect() protoreflect.Message
func (*ListGreetingsResponse) Reset ¶
func (x *ListGreetingsResponse) Reset()
func (*ListGreetingsResponse) String ¶
func (x *ListGreetingsResponse) String() string
type RecordGreetingsRequest ¶
type RecordGreetingsRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*RecordGreetingsRequest) Descriptor
deprecated
func (*RecordGreetingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecordGreetingsRequest.ProtoReflect.Descriptor instead.
func (*RecordGreetingsRequest) GetMessage ¶
func (x *RecordGreetingsRequest) GetMessage() string
func (*RecordGreetingsRequest) ProtoMessage ¶
func (*RecordGreetingsRequest) ProtoMessage()
func (*RecordGreetingsRequest) ProtoReflect ¶
func (x *RecordGreetingsRequest) ProtoReflect() protoreflect.Message
func (*RecordGreetingsRequest) Reset ¶
func (x *RecordGreetingsRequest) Reset()
func (*RecordGreetingsRequest) String ¶
func (x *RecordGreetingsRequest) String() string
type RecordGreetingsResponse ¶
type RecordGreetingsResponse struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*RecordGreetingsResponse) Descriptor
deprecated
func (*RecordGreetingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use RecordGreetingsResponse.ProtoReflect.Descriptor instead.
func (*RecordGreetingsResponse) GetCount ¶
func (x *RecordGreetingsResponse) GetCount() int64
func (*RecordGreetingsResponse) ProtoMessage ¶
func (*RecordGreetingsResponse) ProtoMessage()
func (*RecordGreetingsResponse) ProtoReflect ¶
func (x *RecordGreetingsResponse) ProtoReflect() protoreflect.Message
func (*RecordGreetingsResponse) Reset ¶
func (x *RecordGreetingsResponse) Reset()
func (*RecordGreetingsResponse) String ¶
func (x *RecordGreetingsResponse) String() string
type SayHelloRequest ¶
type SayHelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*SayHelloRequest) Descriptor
deprecated
func (*SayHelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.
func (*SayHelloRequest) GetName ¶
func (x *SayHelloRequest) GetName() string
func (*SayHelloRequest) ProtoMessage ¶
func (*SayHelloRequest) ProtoMessage()
func (*SayHelloRequest) ProtoReflect ¶
func (x *SayHelloRequest) ProtoReflect() protoreflect.Message
func (*SayHelloRequest) Reset ¶
func (x *SayHelloRequest) Reset()
func (*SayHelloRequest) String ¶
func (x *SayHelloRequest) String() string
type SayHelloResponse ¶
type SayHelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*SayHelloResponse) Descriptor
deprecated
func (*SayHelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.
func (*SayHelloResponse) GetMessage ¶
func (x *SayHelloResponse) GetMessage() string
func (*SayHelloResponse) ProtoMessage ¶
func (*SayHelloResponse) ProtoMessage()
func (*SayHelloResponse) ProtoReflect ¶
func (x *SayHelloResponse) ProtoReflect() protoreflect.Message
func (*SayHelloResponse) Reset ¶
func (x *SayHelloResponse) Reset()
func (*SayHelloResponse) String ¶
func (x *SayHelloResponse) String() string
type UnimplementedGreeterServiceServer ¶
type UnimplementedGreeterServiceServer struct { }
UnimplementedGreeterServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServiceServer) ListGreetings ¶
func (UnimplementedGreeterServiceServer) ListGreetings(*ListGreetingsRequest, GreeterService_ListGreetingsServer) error
func (UnimplementedGreeterServiceServer) RecordGreetings ¶
func (UnimplementedGreeterServiceServer) RecordGreetings(GreeterService_RecordGreetingsServer) error
func (UnimplementedGreeterServiceServer) SayHello ¶
func (UnimplementedGreeterServiceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
type UnsafeGreeterServiceServer ¶
type UnsafeGreeterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServiceServer will result in compilation errors.