go.ligato.io/vpp-agent/v3@v3.5.0/proto/ligato/configurator/configurator_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.1.0
     4  // - protoc             v3.17.3
     5  // source: ligato/configurator/configurator.proto
     6  
     7  package configurator
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  // ConfiguratorServiceClient is the client API for ConfiguratorService service.
    22  //
    23  // 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.
    24  type ConfiguratorServiceClient interface {
    25  	// Get is used for listing desired config.
    26  	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
    27  	// Update is used for updating desired config.
    28  	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
    29  	// Delete is used for deleting desired config.
    30  	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
    31  	// Dump is used for dumping running config.
    32  	Dump(ctx context.Context, in *DumpRequest, opts ...grpc.CallOption) (*DumpResponse, error)
    33  	// Notify is used for subscribing to notifications.
    34  	Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (ConfiguratorService_NotifyClient, error)
    35  }
    36  
    37  type configuratorServiceClient struct {
    38  	cc grpc.ClientConnInterface
    39  }
    40  
    41  func NewConfiguratorServiceClient(cc grpc.ClientConnInterface) ConfiguratorServiceClient {
    42  	return &configuratorServiceClient{cc}
    43  }
    44  
    45  func (c *configuratorServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
    46  	out := new(GetResponse)
    47  	err := c.cc.Invoke(ctx, "/ligato.configurator.ConfiguratorService/Get", in, out, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return out, nil
    52  }
    53  
    54  func (c *configuratorServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
    55  	out := new(UpdateResponse)
    56  	err := c.cc.Invoke(ctx, "/ligato.configurator.ConfiguratorService/Update", in, out, opts...)
    57  	if err != nil {
    58  		return nil, err
    59  	}
    60  	return out, nil
    61  }
    62  
    63  func (c *configuratorServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
    64  	out := new(DeleteResponse)
    65  	err := c.cc.Invoke(ctx, "/ligato.configurator.ConfiguratorService/Delete", in, out, opts...)
    66  	if err != nil {
    67  		return nil, err
    68  	}
    69  	return out, nil
    70  }
    71  
    72  func (c *configuratorServiceClient) Dump(ctx context.Context, in *DumpRequest, opts ...grpc.CallOption) (*DumpResponse, error) {
    73  	out := new(DumpResponse)
    74  	err := c.cc.Invoke(ctx, "/ligato.configurator.ConfiguratorService/Dump", in, out, opts...)
    75  	if err != nil {
    76  		return nil, err
    77  	}
    78  	return out, nil
    79  }
    80  
    81  func (c *configuratorServiceClient) Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (ConfiguratorService_NotifyClient, error) {
    82  	stream, err := c.cc.NewStream(ctx, &ConfiguratorService_ServiceDesc.Streams[0], "/ligato.configurator.ConfiguratorService/Notify", opts...)
    83  	if err != nil {
    84  		return nil, err
    85  	}
    86  	x := &configuratorServiceNotifyClient{stream}
    87  	if err := x.ClientStream.SendMsg(in); err != nil {
    88  		return nil, err
    89  	}
    90  	if err := x.ClientStream.CloseSend(); err != nil {
    91  		return nil, err
    92  	}
    93  	return x, nil
    94  }
    95  
    96  type ConfiguratorService_NotifyClient interface {
    97  	Recv() (*NotifyResponse, error)
    98  	grpc.ClientStream
    99  }
   100  
   101  type configuratorServiceNotifyClient struct {
   102  	grpc.ClientStream
   103  }
   104  
   105  func (x *configuratorServiceNotifyClient) Recv() (*NotifyResponse, error) {
   106  	m := new(NotifyResponse)
   107  	if err := x.ClientStream.RecvMsg(m); err != nil {
   108  		return nil, err
   109  	}
   110  	return m, nil
   111  }
   112  
   113  // ConfiguratorServiceServer is the server API for ConfiguratorService service.
   114  // All implementations must embed UnimplementedConfiguratorServiceServer
   115  // for forward compatibility
   116  type ConfiguratorServiceServer interface {
   117  	// Get is used for listing desired config.
   118  	Get(context.Context, *GetRequest) (*GetResponse, error)
   119  	// Update is used for updating desired config.
   120  	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
   121  	// Delete is used for deleting desired config.
   122  	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
   123  	// Dump is used for dumping running config.
   124  	Dump(context.Context, *DumpRequest) (*DumpResponse, error)
   125  	// Notify is used for subscribing to notifications.
   126  	Notify(*NotifyRequest, ConfiguratorService_NotifyServer) error
   127  	mustEmbedUnimplementedConfiguratorServiceServer()
   128  }
   129  
   130  // UnimplementedConfiguratorServiceServer must be embedded to have forward compatible implementations.
   131  type UnimplementedConfiguratorServiceServer struct {
   132  }
   133  
   134  func (UnimplementedConfiguratorServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
   135  	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
   136  }
   137  func (UnimplementedConfiguratorServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) {
   138  	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
   139  }
   140  func (UnimplementedConfiguratorServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
   141  	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
   142  }
   143  func (UnimplementedConfiguratorServiceServer) Dump(context.Context, *DumpRequest) (*DumpResponse, error) {
   144  	return nil, status.Errorf(codes.Unimplemented, "method Dump not implemented")
   145  }
   146  func (UnimplementedConfiguratorServiceServer) Notify(*NotifyRequest, ConfiguratorService_NotifyServer) error {
   147  	return status.Errorf(codes.Unimplemented, "method Notify not implemented")
   148  }
   149  func (UnimplementedConfiguratorServiceServer) mustEmbedUnimplementedConfiguratorServiceServer() {}
   150  
   151  // UnsafeConfiguratorServiceServer may be embedded to opt out of forward compatibility for this service.
   152  // Use of this interface is not recommended, as added methods to ConfiguratorServiceServer will
   153  // result in compilation errors.
   154  type UnsafeConfiguratorServiceServer interface {
   155  	mustEmbedUnimplementedConfiguratorServiceServer()
   156  }
   157  
   158  func RegisterConfiguratorServiceServer(s grpc.ServiceRegistrar, srv ConfiguratorServiceServer) {
   159  	s.RegisterService(&ConfiguratorService_ServiceDesc, srv)
   160  }
   161  
   162  func _ConfiguratorService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   163  	in := new(GetRequest)
   164  	if err := dec(in); err != nil {
   165  		return nil, err
   166  	}
   167  	if interceptor == nil {
   168  		return srv.(ConfiguratorServiceServer).Get(ctx, in)
   169  	}
   170  	info := &grpc.UnaryServerInfo{
   171  		Server:     srv,
   172  		FullMethod: "/ligato.configurator.ConfiguratorService/Get",
   173  	}
   174  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   175  		return srv.(ConfiguratorServiceServer).Get(ctx, req.(*GetRequest))
   176  	}
   177  	return interceptor(ctx, in, info, handler)
   178  }
   179  
   180  func _ConfiguratorService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   181  	in := new(UpdateRequest)
   182  	if err := dec(in); err != nil {
   183  		return nil, err
   184  	}
   185  	if interceptor == nil {
   186  		return srv.(ConfiguratorServiceServer).Update(ctx, in)
   187  	}
   188  	info := &grpc.UnaryServerInfo{
   189  		Server:     srv,
   190  		FullMethod: "/ligato.configurator.ConfiguratorService/Update",
   191  	}
   192  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   193  		return srv.(ConfiguratorServiceServer).Update(ctx, req.(*UpdateRequest))
   194  	}
   195  	return interceptor(ctx, in, info, handler)
   196  }
   197  
   198  func _ConfiguratorService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   199  	in := new(DeleteRequest)
   200  	if err := dec(in); err != nil {
   201  		return nil, err
   202  	}
   203  	if interceptor == nil {
   204  		return srv.(ConfiguratorServiceServer).Delete(ctx, in)
   205  	}
   206  	info := &grpc.UnaryServerInfo{
   207  		Server:     srv,
   208  		FullMethod: "/ligato.configurator.ConfiguratorService/Delete",
   209  	}
   210  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   211  		return srv.(ConfiguratorServiceServer).Delete(ctx, req.(*DeleteRequest))
   212  	}
   213  	return interceptor(ctx, in, info, handler)
   214  }
   215  
   216  func _ConfiguratorService_Dump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   217  	in := new(DumpRequest)
   218  	if err := dec(in); err != nil {
   219  		return nil, err
   220  	}
   221  	if interceptor == nil {
   222  		return srv.(ConfiguratorServiceServer).Dump(ctx, in)
   223  	}
   224  	info := &grpc.UnaryServerInfo{
   225  		Server:     srv,
   226  		FullMethod: "/ligato.configurator.ConfiguratorService/Dump",
   227  	}
   228  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   229  		return srv.(ConfiguratorServiceServer).Dump(ctx, req.(*DumpRequest))
   230  	}
   231  	return interceptor(ctx, in, info, handler)
   232  }
   233  
   234  func _ConfiguratorService_Notify_Handler(srv interface{}, stream grpc.ServerStream) error {
   235  	m := new(NotifyRequest)
   236  	if err := stream.RecvMsg(m); err != nil {
   237  		return err
   238  	}
   239  	return srv.(ConfiguratorServiceServer).Notify(m, &configuratorServiceNotifyServer{stream})
   240  }
   241  
   242  type ConfiguratorService_NotifyServer interface {
   243  	Send(*NotifyResponse) error
   244  	grpc.ServerStream
   245  }
   246  
   247  type configuratorServiceNotifyServer struct {
   248  	grpc.ServerStream
   249  }
   250  
   251  func (x *configuratorServiceNotifyServer) Send(m *NotifyResponse) error {
   252  	return x.ServerStream.SendMsg(m)
   253  }
   254  
   255  // ConfiguratorService_ServiceDesc is the grpc.ServiceDesc for ConfiguratorService service.
   256  // It's only intended for direct use with grpc.RegisterService,
   257  // and not to be introspected or modified (even as a copy)
   258  var ConfiguratorService_ServiceDesc = grpc.ServiceDesc{
   259  	ServiceName: "ligato.configurator.ConfiguratorService",
   260  	HandlerType: (*ConfiguratorServiceServer)(nil),
   261  	Methods: []grpc.MethodDesc{
   262  		{
   263  			MethodName: "Get",
   264  			Handler:    _ConfiguratorService_Get_Handler,
   265  		},
   266  		{
   267  			MethodName: "Update",
   268  			Handler:    _ConfiguratorService_Update_Handler,
   269  		},
   270  		{
   271  			MethodName: "Delete",
   272  			Handler:    _ConfiguratorService_Delete_Handler,
   273  		},
   274  		{
   275  			MethodName: "Dump",
   276  			Handler:    _ConfiguratorService_Dump_Handler,
   277  		},
   278  	},
   279  	Streams: []grpc.StreamDesc{
   280  		{
   281  			StreamName:    "Notify",
   282  			Handler:       _ConfiguratorService_Notify_Handler,
   283  			ServerStreams: true,
   284  		},
   285  	},
   286  	Metadata: "ligato/configurator/configurator.proto",
   287  }