Documentation ¶
Index ¶
- Variables
- func RegisterGreetingServiceServer(s grpc.ServiceRegistrar, srv GreetingServiceServer)
- type GreetingServiceClient
- type GreetingServiceServer
- type GreetingService_HelloClientStreamClient
- type GreetingService_HelloClientStreamServer
- type GreetingService_HelloServerStreamClient
- type GreetingService_HelloServerStreamServer
- type HelloRequest
- type HelloResponse
- type UnimplementedGreetingServiceServer
- func (UnimplementedGreetingServiceServer) Hello(context.Context, *HelloRequest) (*HelloResponse, error)
- func (UnimplementedGreetingServiceServer) HelloClientStream(GreetingService_HelloClientStreamServer) error
- func (UnimplementedGreetingServiceServer) HelloServerStream(*HelloRequest, GreetingService_HelloServerStreamServer) error
- type UnsafeGreetingServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_hello_proto protoreflect.FileDescriptor
var GreetingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "myapp.GreetingService", HandlerType: (*GreetingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _GreetingService_Hello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "HelloServerStream", Handler: _GreetingService_HelloServerStream_Handler, ServerStreams: true, }, { StreamName: "HelloClientStream", Handler: _GreetingService_HelloClientStream_Handler, ClientStreams: true, }, }, Metadata: "hello.proto", }
GreetingService_ServiceDesc is the grpc.ServiceDesc for GreetingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreetingServiceServer ¶
func RegisterGreetingServiceServer(s grpc.ServiceRegistrar, srv GreetingServiceServer)
Types ¶
type GreetingServiceClient ¶
type GreetingServiceClient interface { //サービスが持つメソッドの定義 Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) // サーバーストリーミング // 複数の戻り値を返すため「stream」と付ける HelloServerStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (GreetingService_HelloServerStreamClient, error) // クライアントストリーミング // 複数の入力値のために「stream」と付ける HelloClientStream(ctx context.Context, opts ...grpc.CallOption) (GreetingService_HelloClientStreamClient, error) }
GreetingServiceClient is the client API for GreetingService 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 NewGreetingServiceClient ¶
func NewGreetingServiceClient(cc grpc.ClientConnInterface) GreetingServiceClient
type GreetingServiceServer ¶
type GreetingServiceServer interface { //サービスが持つメソッドの定義 Hello(context.Context, *HelloRequest) (*HelloResponse, error) // サーバーストリーミング // 複数の戻り値を返すため「stream」と付ける HelloServerStream(*HelloRequest, GreetingService_HelloServerStreamServer) error // クライアントストリーミング // 複数の入力値のために「stream」と付ける HelloClientStream(GreetingService_HelloClientStreamServer) error // contains filtered or unexported methods }
GreetingServiceServer is the server API for GreetingService service. All implementations must embed UnimplementedGreetingServiceServer for forward compatibility
type GreetingService_HelloClientStreamClient ¶
type GreetingService_HelloClientStreamClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloResponse, error) grpc.ClientStream }
type GreetingService_HelloClientStreamServer ¶
type GreetingService_HelloClientStreamServer interface { SendAndClose(*HelloResponse) error Recv() (*HelloRequest, error) grpc.ServerStream }
type GreetingService_HelloServerStreamClient ¶
type GreetingService_HelloServerStreamClient interface { Recv() (*HelloResponse, error) grpc.ClientStream }
type GreetingService_HelloServerStreamServer ¶
type GreetingService_HelloServerStreamServer interface { Send(*HelloResponse) error grpc.ServerStream }
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
型の定義
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type UnimplementedGreetingServiceServer ¶
type UnimplementedGreetingServiceServer struct { }
UnimplementedGreetingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGreetingServiceServer) Hello ¶
func (UnimplementedGreetingServiceServer) Hello(context.Context, *HelloRequest) (*HelloResponse, error)
func (UnimplementedGreetingServiceServer) HelloClientStream ¶
func (UnimplementedGreetingServiceServer) HelloClientStream(GreetingService_HelloClientStreamServer) error
func (UnimplementedGreetingServiceServer) HelloServerStream ¶
func (UnimplementedGreetingServiceServer) HelloServerStream(*HelloRequest, GreetingService_HelloServerStreamServer) error
type UnsafeGreetingServiceServer ¶
type UnsafeGreetingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGreetingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreetingServiceServer will result in compilation errors.