320 lines
14 KiB
Go
320 lines
14 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
|
|
// versions:
|
||
|
|
// - protoc-gen-go-grpc v1.6.2
|
||
|
|
// - protoc (unknown)
|
||
|
|
// source: kafkamgmt/v1/queue_service.proto
|
||
|
|
|
||
|
|
package kafkamgmtv1
|
||
|
|
|
||
|
|
import (
|
||
|
|
context "context"
|
||
|
|
grpc "google.golang.org/grpc"
|
||
|
|
codes "google.golang.org/grpc/codes"
|
||
|
|
status "google.golang.org/grpc/status"
|
||
|
|
)
|
||
|
|
|
||
|
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
|
// is compatible with the grpc package it is being compiled against.
|
||
|
|
// Requires gRPC-Go v1.64.0 or later.
|
||
|
|
const _ = grpc.SupportPackageIsVersion9
|
||
|
|
|
||
|
|
const (
|
||
|
|
QueueService_SendMessage_FullMethodName = "/kafkamgmt.v1.QueueService/SendMessage"
|
||
|
|
QueueService_SendMessageBatch_FullMethodName = "/kafkamgmt.v1.QueueService/SendMessageBatch"
|
||
|
|
QueueService_ReceiveMessage_FullMethodName = "/kafkamgmt.v1.QueueService/ReceiveMessage"
|
||
|
|
QueueService_DeleteMessage_FullMethodName = "/kafkamgmt.v1.QueueService/DeleteMessage"
|
||
|
|
QueueService_DeleteMessageBatch_FullMethodName = "/kafkamgmt.v1.QueueService/DeleteMessageBatch"
|
||
|
|
QueueService_ChangeMessageVisibility_FullMethodName = "/kafkamgmt.v1.QueueService/ChangeMessageVisibility"
|
||
|
|
)
|
||
|
|
|
||
|
|
// QueueServiceClient is the client API for QueueService 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.
|
||
|
|
//
|
||
|
|
// QueueService is the message-plane API for the Kafka Management Service.
|
||
|
|
// Queue lifecycle (create/delete/configure) is managed via the Queue CRD,
|
||
|
|
// not this service — see design.md §2a/§2b in kafaka_management_service.
|
||
|
|
type QueueServiceClient interface {
|
||
|
|
SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
|
||
|
|
SendMessageBatch(ctx context.Context, in *SendMessageBatchRequest, opts ...grpc.CallOption) (*SendMessageBatchResponse, error)
|
||
|
|
ReceiveMessage(ctx context.Context, in *ReceiveMessageRequest, opts ...grpc.CallOption) (*ReceiveMessageResponse, error)
|
||
|
|
DeleteMessage(ctx context.Context, in *DeleteMessageRequest, opts ...grpc.CallOption) (*DeleteMessageResponse, error)
|
||
|
|
DeleteMessageBatch(ctx context.Context, in *DeleteMessageBatchRequest, opts ...grpc.CallOption) (*DeleteMessageBatchResponse, error)
|
||
|
|
ChangeMessageVisibility(ctx context.Context, in *ChangeMessageVisibilityRequest, opts ...grpc.CallOption) (*ChangeMessageVisibilityResponse, error)
|
||
|
|
}
|
||
|
|
|
||
|
|
type queueServiceClient struct {
|
||
|
|
cc grpc.ClientConnInterface
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewQueueServiceClient(cc grpc.ClientConnInterface) QueueServiceClient {
|
||
|
|
return &queueServiceClient{cc}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(SendMessageResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_SendMessage_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) SendMessageBatch(ctx context.Context, in *SendMessageBatchRequest, opts ...grpc.CallOption) (*SendMessageBatchResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(SendMessageBatchResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_SendMessageBatch_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) ReceiveMessage(ctx context.Context, in *ReceiveMessageRequest, opts ...grpc.CallOption) (*ReceiveMessageResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(ReceiveMessageResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_ReceiveMessage_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) DeleteMessage(ctx context.Context, in *DeleteMessageRequest, opts ...grpc.CallOption) (*DeleteMessageResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(DeleteMessageResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_DeleteMessage_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) DeleteMessageBatch(ctx context.Context, in *DeleteMessageBatchRequest, opts ...grpc.CallOption) (*DeleteMessageBatchResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(DeleteMessageBatchResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_DeleteMessageBatch_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *queueServiceClient) ChangeMessageVisibility(ctx context.Context, in *ChangeMessageVisibilityRequest, opts ...grpc.CallOption) (*ChangeMessageVisibilityResponse, error) {
|
||
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||
|
|
out := new(ChangeMessageVisibilityResponse)
|
||
|
|
err := c.cc.Invoke(ctx, QueueService_ChangeMessageVisibility_FullMethodName, in, out, cOpts...)
|
||
|
|
if err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
return out, nil
|
||
|
|
}
|
||
|
|
|
||
|
|
// QueueServiceServer is the server API for QueueService service.
|
||
|
|
// All implementations must embed UnimplementedQueueServiceServer
|
||
|
|
// for forward compatibility.
|
||
|
|
//
|
||
|
|
// QueueService is the message-plane API for the Kafka Management Service.
|
||
|
|
// Queue lifecycle (create/delete/configure) is managed via the Queue CRD,
|
||
|
|
// not this service — see design.md §2a/§2b in kafaka_management_service.
|
||
|
|
type QueueServiceServer interface {
|
||
|
|
SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error)
|
||
|
|
SendMessageBatch(context.Context, *SendMessageBatchRequest) (*SendMessageBatchResponse, error)
|
||
|
|
ReceiveMessage(context.Context, *ReceiveMessageRequest) (*ReceiveMessageResponse, error)
|
||
|
|
DeleteMessage(context.Context, *DeleteMessageRequest) (*DeleteMessageResponse, error)
|
||
|
|
DeleteMessageBatch(context.Context, *DeleteMessageBatchRequest) (*DeleteMessageBatchResponse, error)
|
||
|
|
ChangeMessageVisibility(context.Context, *ChangeMessageVisibilityRequest) (*ChangeMessageVisibilityResponse, error)
|
||
|
|
mustEmbedUnimplementedQueueServiceServer()
|
||
|
|
}
|
||
|
|
|
||
|
|
// UnimplementedQueueServiceServer must 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.
|
||
|
|
type UnimplementedQueueServiceServer struct{}
|
||
|
|
|
||
|
|
func (UnimplementedQueueServiceServer) SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method SendMessage not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) SendMessageBatch(context.Context, *SendMessageBatchRequest) (*SendMessageBatchResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method SendMessageBatch not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) ReceiveMessage(context.Context, *ReceiveMessageRequest) (*ReceiveMessageResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method ReceiveMessage not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) DeleteMessage(context.Context, *DeleteMessageRequest) (*DeleteMessageResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteMessage not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) DeleteMessageBatch(context.Context, *DeleteMessageBatchRequest) (*DeleteMessageBatchResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteMessageBatch not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) ChangeMessageVisibility(context.Context, *ChangeMessageVisibilityRequest) (*ChangeMessageVisibilityResponse, error) {
|
||
|
|
return nil, status.Error(codes.Unimplemented, "method ChangeMessageVisibility not implemented")
|
||
|
|
}
|
||
|
|
func (UnimplementedQueueServiceServer) mustEmbedUnimplementedQueueServiceServer() {}
|
||
|
|
func (UnimplementedQueueServiceServer) testEmbeddedByValue() {}
|
||
|
|
|
||
|
|
// UnsafeQueueServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
|
|
// Use of this interface is not recommended, as added methods to QueueServiceServer will
|
||
|
|
// result in compilation errors.
|
||
|
|
type UnsafeQueueServiceServer interface {
|
||
|
|
mustEmbedUnimplementedQueueServiceServer()
|
||
|
|
}
|
||
|
|
|
||
|
|
func RegisterQueueServiceServer(s grpc.ServiceRegistrar, srv QueueServiceServer) {
|
||
|
|
// If the following call panics, it indicates UnimplementedQueueServiceServer was
|
||
|
|
// embedded by pointer and is nil. This will cause panics if an
|
||
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
||
|
|
// time to prevent it from happening at runtime later due to I/O.
|
||
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||
|
|
t.testEmbeddedByValue()
|
||
|
|
}
|
||
|
|
s.RegisterService(&QueueService_ServiceDesc, srv)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(SendMessageRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).SendMessage(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_SendMessage_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).SendMessage(ctx, req.(*SendMessageRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_SendMessageBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(SendMessageBatchRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).SendMessageBatch(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_SendMessageBatch_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).SendMessageBatch(ctx, req.(*SendMessageBatchRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_ReceiveMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(ReceiveMessageRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).ReceiveMessage(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_ReceiveMessage_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).ReceiveMessage(ctx, req.(*ReceiveMessageRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_DeleteMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(DeleteMessageRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).DeleteMessage(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_DeleteMessage_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).DeleteMessage(ctx, req.(*DeleteMessageRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_DeleteMessageBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(DeleteMessageBatchRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).DeleteMessageBatch(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_DeleteMessageBatch_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).DeleteMessageBatch(ctx, req.(*DeleteMessageBatchRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
func _QueueService_ChangeMessageVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
|
in := new(ChangeMessageVisibilityRequest)
|
||
|
|
if err := dec(in); err != nil {
|
||
|
|
return nil, err
|
||
|
|
}
|
||
|
|
if interceptor == nil {
|
||
|
|
return srv.(QueueServiceServer).ChangeMessageVisibility(ctx, in)
|
||
|
|
}
|
||
|
|
info := &grpc.UnaryServerInfo{
|
||
|
|
Server: srv,
|
||
|
|
FullMethod: QueueService_ChangeMessageVisibility_FullMethodName,
|
||
|
|
}
|
||
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
|
return srv.(QueueServiceServer).ChangeMessageVisibility(ctx, req.(*ChangeMessageVisibilityRequest))
|
||
|
|
}
|
||
|
|
return interceptor(ctx, in, info, handler)
|
||
|
|
}
|
||
|
|
|
||
|
|
// QueueService_ServiceDesc is the grpc.ServiceDesc for QueueService service.
|
||
|
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
|
// and not to be introspected or modified (even as a copy)
|
||
|
|
var QueueService_ServiceDesc = grpc.ServiceDesc{
|
||
|
|
ServiceName: "kafkamgmt.v1.QueueService",
|
||
|
|
HandlerType: (*QueueServiceServer)(nil),
|
||
|
|
Methods: []grpc.MethodDesc{
|
||
|
|
{
|
||
|
|
MethodName: "SendMessage",
|
||
|
|
Handler: _QueueService_SendMessage_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "SendMessageBatch",
|
||
|
|
Handler: _QueueService_SendMessageBatch_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "ReceiveMessage",
|
||
|
|
Handler: _QueueService_ReceiveMessage_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "DeleteMessage",
|
||
|
|
Handler: _QueueService_DeleteMessage_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "DeleteMessageBatch",
|
||
|
|
Handler: _QueueService_DeleteMessageBatch_Handler,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
MethodName: "ChangeMessageVisibility",
|
||
|
|
Handler: _QueueService_ChangeMessageVisibility_Handler,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
Streams: []grpc.StreamDesc{},
|
||
|
|
Metadata: "kafkamgmt/v1/queue_service.proto",
|
||
|
|
}
|