Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterConformanceServiceServer(s grpc.ServiceRegistrar, srv ConformanceServiceServer)
- type ConformanceServiceClient
- type ConformanceServiceServer
- type ConformanceService_BidiStreamClient
- type ConformanceService_BidiStreamServer
- type ConformanceService_ClientStreamClient
- type ConformanceService_ClientStreamServer
- type ConformanceService_ServerStreamClient
- type ConformanceService_ServerStreamServer
- type UnimplementedConformanceServiceServer
- func (UnimplementedConformanceServiceServer) BidiStream(grpc.BidiStreamingServer[v1.BidiStreamRequest, v1.BidiStreamResponse]) error
- func (UnimplementedConformanceServiceServer) ClientStream(grpc.ClientStreamingServer[v1.ClientStreamRequest, v1.ClientStreamResponse]) error
- func (UnimplementedConformanceServiceServer) IdempotentUnary(context.Context, *v1.IdempotentUnaryRequest) (*v1.IdempotentUnaryResponse, error)
- func (UnimplementedConformanceServiceServer) ServerStream(*v1.ServerStreamRequest, grpc.ServerStreamingServer[v1.ServerStreamResponse]) error
- func (UnimplementedConformanceServiceServer) Unary(context.Context, *v1.UnaryRequest) (*v1.UnaryResponse, error)
- func (UnimplementedConformanceServiceServer) Unimplemented(context.Context, *v1.UnimplementedRequest) (*v1.UnimplementedResponse, error)
- type UnsafeConformanceServiceServer
Constants ¶
const ( ConformanceService_Unary_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/Unary" ConformanceService_ServerStream_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/ServerStream" ConformanceService_ClientStream_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/ClientStream" ConformanceService_BidiStream_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/BidiStream" ConformanceService_Unimplemented_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/Unimplemented" ConformanceService_IdempotentUnary_FullMethodName = "/connectrpc.conformance.v1.ConformanceService/IdempotentUnary" )
Variables ¶
var ConformanceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "connectrpc.conformance.v1.ConformanceService", HandlerType: (*ConformanceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Unary", Handler: _ConformanceService_Unary_Handler, }, { MethodName: "Unimplemented", Handler: _ConformanceService_Unimplemented_Handler, }, { MethodName: "IdempotentUnary", Handler: _ConformanceService_IdempotentUnary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ServerStream", Handler: _ConformanceService_ServerStream_Handler, ServerStreams: true, }, { StreamName: "ClientStream", Handler: _ConformanceService_ClientStream_Handler, ClientStreams: true, }, { StreamName: "BidiStream", Handler: _ConformanceService_BidiStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "connectrpc/conformance/v1/service.proto", }
ConformanceService_ServiceDesc is the grpc.ServiceDesc for ConformanceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterConformanceServiceServer ¶
func RegisterConformanceServiceServer(s grpc.ServiceRegistrar, srv ConformanceServiceServer)
Types ¶
type ConformanceServiceClient ¶
type ConformanceServiceClient interface {
// A unary operation. The request indicates the response headers and trailers
// and also indicates either a response message or an error to send back.
//
// Response message data is specified as bytes. The service should echo back
// request properties in the ConformancePayload and then include the message
// data in the data field.
//
// If the response_delay_ms duration is specified, the server should wait the
// given duration after reading the request before sending the corresponding
// response.
//
// Servers should allow the response definition to be unset in the request and
// if it is, set no response headers or trailers and return no response data.
// The returned payload should only contain the request info.
Unary(ctx context.Context, in *v1.UnaryRequest, opts ...grpc.CallOption) (*v1.UnaryResponse, error)
// A server-streaming operation. The request indicates the response headers,
// response messages, trailers, and an optional error to send back. The
// response data should be sent in the order indicated, and the server should
// wait between sending response messages as indicated.
//
// Response message data is specified as bytes. The service should echo back
// request properties in the first ConformancePayload, and then include the
// message data in the data field. Subsequent messages after the first one
// should contain only the data field.
//
// Servers should immediately send response headers on the stream before sleeping
// for any specified response delay and/or sending the first message so that
// clients can be unblocked reading response headers.
//
// If a response definition is not specified OR is specified, but response data
// is empty, the server should skip sending anything on the stream. When there
// are no responses to send, servers should throw an error if one is provided
// and return without error if one is not. Stream headers and trailers should
// still be set on the stream if provided regardless of whether a response is
// sent or an error is thrown.
ServerStream(ctx context.Context, in *v1.ServerStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.ServerStreamResponse], error)
// A client-streaming operation. The first request indicates the response
// headers and trailers and also indicates either a response message or an
// error to send back.
//
// Response message data is specified as bytes. The service should echo back
// request properties, including all request messages in the order they were
// received, in the ConformancePayload and then include the message data in
// the data field.
//
// If the input stream is empty, the server's response will include no data,
// only the request properties (headers, timeout).
//
// Servers should only read the response definition from the first message in
// the stream and should ignore any definition set in subsequent messages.
//
// Servers should allow the response definition to be unset in the request and
// if it is, set no response headers or trailers and return no response data.
// The returned payload should only contain the request info.
ClientStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[v1.ClientStreamRequest, v1.ClientStreamResponse], error)
// A bidirectional-streaming operation. The first request indicates the response
// headers, response messages, trailers, and an optional error to send back.
// The response data should be sent in the order indicated, and the server
// should wait between sending response messages as indicated.
//
// Response message data is specified as bytes and should be included in the
// data field of the ConformancePayload in each response.
//
// Servers should send responses indicated according to the rules of half duplex
// vs. full duplex streams. Once all responses are sent, the server should either
// return an error if specified or close the stream without error.
//
// Servers should immediately send response headers on the stream before sleeping
// for any specified response delay and/or sending the first message so that
// clients can be unblocked reading response headers.
//
// If a response definition is not specified OR is specified, but response data
// is empty, the server should skip sending anything on the stream. Stream
// headers and trailers should always be set on the stream if provided
// regardless of whether a response is sent or an error is thrown.
//
// If the full_duplex field is true:
// - the handler should read one request and then send back one response, and
// then alternate, reading another request and then sending back another response, etc.
//
// - if the server receives a request and has no responses to send, it
// should throw the error specified in the request.
//
// - the service should echo back all request properties in the first response
// including the last received request. Subsequent responses should only
// echo back the last received request.
//
// - if the response_delay_ms duration is specified, the server should wait the given
// duration after reading the request before sending the corresponding
// response.
//
// If the full_duplex field is false:
// - the handler should read all requests until the client is done sending.
// Once all requests are read, the server should then send back any responses
// specified in the response definition.
//
// - the server should echo back all request properties, including all request
// messages in the order they were received, in the first response. Subsequent
// responses should only include the message data in the data field.
//
// - if the response_delay_ms duration is specified, the server should wait that
// long in between sending each response message.
BidiStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[v1.BidiStreamRequest, v1.BidiStreamResponse], error)
// A unary endpoint that the server should not implement and should instead
// return an unimplemented error when invoked.
Unimplemented(ctx context.Context, in *v1.UnimplementedRequest, opts ...grpc.CallOption) (*v1.UnimplementedResponse, error)
// A unary endpoint denoted as having no side effects (i.e. idempotent).
// Implementations should use an HTTP GET when invoking this endpoint and
// leverage query parameters to send data.
IdempotentUnary(ctx context.Context, in *v1.IdempotentUnaryRequest, opts ...grpc.CallOption) (*v1.IdempotentUnaryResponse, error)
}
ConformanceServiceClient is the client API for ConformanceService 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.
The service implemented by conformance test servers. This is implemented by the reference servers, used to test clients, and is expected to be implemented by test servers, since this is the service used by reference clients.
Test servers must implement the service as described.
func NewConformanceServiceClient ¶
func NewConformanceServiceClient(cc grpc.ClientConnInterface) ConformanceServiceClient
type ConformanceServiceServer ¶
type ConformanceServiceServer interface {
// A unary operation. The request indicates the response headers and trailers
// and also indicates either a response message or an error to send back.
//
// Response message data is specified as bytes. The service should echo back
// request properties in the ConformancePayload and then include the message
// data in the data field.
//
// If the response_delay_ms duration is specified, the server should wait the
// given duration after reading the request before sending the corresponding
// response.
//
// Servers should allow the response definition to be unset in the request and
// if it is, set no response headers or trailers and return no response data.
// The returned payload should only contain the request info.
Unary(context.Context, *v1.UnaryRequest) (*v1.UnaryResponse, error)
// A server-streaming operation. The request indicates the response headers,
// response messages, trailers, and an optional error to send back. The
// response data should be sent in the order indicated, and the server should
// wait between sending response messages as indicated.
//
// Response message data is specified as bytes. The service should echo back
// request properties in the first ConformancePayload, and then include the
// message data in the data field. Subsequent messages after the first one
// should contain only the data field.
//
// Servers should immediately send response headers on the stream before sleeping
// for any specified response delay and/or sending the first message so that
// clients can be unblocked reading response headers.
//
// If a response definition is not specified OR is specified, but response data
// is empty, the server should skip sending anything on the stream. When there
// are no responses to send, servers should throw an error if one is provided
// and return without error if one is not. Stream headers and trailers should
// still be set on the stream if provided regardless of whether a response is
// sent or an error is thrown.
ServerStream(*v1.ServerStreamRequest, grpc.ServerStreamingServer[v1.ServerStreamResponse]) error
// A client-streaming operation. The first request indicates the response
// headers and trailers and also indicates either a response message or an
// error to send back.
//
// Response message data is specified as bytes. The service should echo back
// request properties, including all request messages in the order they were
// received, in the ConformancePayload and then include the message data in
// the data field.
//
// If the input stream is empty, the server's response will include no data,
// only the request properties (headers, timeout).
//
// Servers should only read the response definition from the first message in
// the stream and should ignore any definition set in subsequent messages.
//
// Servers should allow the response definition to be unset in the request and
// if it is, set no response headers or trailers and return no response data.
// The returned payload should only contain the request info.
ClientStream(grpc.ClientStreamingServer[v1.ClientStreamRequest, v1.ClientStreamResponse]) error
// A bidirectional-streaming operation. The first request indicates the response
// headers, response messages, trailers, and an optional error to send back.
// The response data should be sent in the order indicated, and the server
// should wait between sending response messages as indicated.
//
// Response message data is specified as bytes and should be included in the
// data field of the ConformancePayload in each response.
//
// Servers should send responses indicated according to the rules of half duplex
// vs. full duplex streams. Once all responses are sent, the server should either
// return an error if specified or close the stream without error.
//
// Servers should immediately send response headers on the stream before sleeping
// for any specified response delay and/or sending the first message so that
// clients can be unblocked reading response headers.
//
// If a response definition is not specified OR is specified, but response data
// is empty, the server should skip sending anything on the stream. Stream
// headers and trailers should always be set on the stream if provided
// regardless of whether a response is sent or an error is thrown.
//
// If the full_duplex field is true:
// - the handler should read one request and then send back one response, and
// then alternate, reading another request and then sending back another response, etc.
//
// - if the server receives a request and has no responses to send, it
// should throw the error specified in the request.
//
// - the service should echo back all request properties in the first response
// including the last received request. Subsequent responses should only
// echo back the last received request.
//
// - if the response_delay_ms duration is specified, the server should wait the given
// duration after reading the request before sending the corresponding
// response.
//
// If the full_duplex field is false:
// - the handler should read all requests until the client is done sending.
// Once all requests are read, the server should then send back any responses
// specified in the response definition.
//
// - the server should echo back all request properties, including all request
// messages in the order they were received, in the first response. Subsequent
// responses should only include the message data in the data field.
//
// - if the response_delay_ms duration is specified, the server should wait that
// long in between sending each response message.
BidiStream(grpc.BidiStreamingServer[v1.BidiStreamRequest, v1.BidiStreamResponse]) error
// A unary endpoint that the server should not implement and should instead
// return an unimplemented error when invoked.
Unimplemented(context.Context, *v1.UnimplementedRequest) (*v1.UnimplementedResponse, error)
// A unary endpoint denoted as having no side effects (i.e. idempotent).
// Implementations should use an HTTP GET when invoking this endpoint and
// leverage query parameters to send data.
IdempotentUnary(context.Context, *v1.IdempotentUnaryRequest) (*v1.IdempotentUnaryResponse, error)
}
ConformanceServiceServer is the server API for ConformanceService service. All implementations should embed UnimplementedConformanceServiceServer for forward compatibility.
The service implemented by conformance test servers. This is implemented by the reference servers, used to test clients, and is expected to be implemented by test servers, since this is the service used by reference clients.
Test servers must implement the service as described.
type ConformanceService_BidiStreamClient ¶
type ConformanceService_BidiStreamClient = grpc.BidiStreamingClient[v1.BidiStreamRequest, v1.BidiStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConformanceService_BidiStreamServer ¶
type ConformanceService_BidiStreamServer = grpc.BidiStreamingServer[v1.BidiStreamRequest, v1.BidiStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConformanceService_ClientStreamClient ¶
type ConformanceService_ClientStreamClient = grpc.ClientStreamingClient[v1.ClientStreamRequest, v1.ClientStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConformanceService_ClientStreamServer ¶
type ConformanceService_ClientStreamServer = grpc.ClientStreamingServer[v1.ClientStreamRequest, v1.ClientStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConformanceService_ServerStreamClient ¶
type ConformanceService_ServerStreamClient = grpc.ServerStreamingClient[v1.ServerStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConformanceService_ServerStreamServer ¶
type ConformanceService_ServerStreamServer = grpc.ServerStreamingServer[v1.ServerStreamResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedConformanceServiceServer ¶
type UnimplementedConformanceServiceServer struct{}
UnimplementedConformanceServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedConformanceServiceServer) BidiStream ¶
func (UnimplementedConformanceServiceServer) BidiStream(grpc.BidiStreamingServer[v1.BidiStreamRequest, v1.BidiStreamResponse]) error
func (UnimplementedConformanceServiceServer) ClientStream ¶
func (UnimplementedConformanceServiceServer) ClientStream(grpc.ClientStreamingServer[v1.ClientStreamRequest, v1.ClientStreamResponse]) error
func (UnimplementedConformanceServiceServer) IdempotentUnary ¶
func (UnimplementedConformanceServiceServer) IdempotentUnary(context.Context, *v1.IdempotentUnaryRequest) (*v1.IdempotentUnaryResponse, error)
func (UnimplementedConformanceServiceServer) ServerStream ¶
func (UnimplementedConformanceServiceServer) ServerStream(*v1.ServerStreamRequest, grpc.ServerStreamingServer[v1.ServerStreamResponse]) error
func (UnimplementedConformanceServiceServer) Unary ¶
func (UnimplementedConformanceServiceServer) Unary(context.Context, *v1.UnaryRequest) (*v1.UnaryResponse, error)
func (UnimplementedConformanceServiceServer) Unimplemented ¶
func (UnimplementedConformanceServiceServer) Unimplemented(context.Context, *v1.UnimplementedRequest) (*v1.UnimplementedResponse, error)
type UnsafeConformanceServiceServer ¶
type UnsafeConformanceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConformanceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConformanceServiceServer will result in compilation errors.
Source Files
¶
- service_grpc.pb.go