github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/enginepb/master_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package enginepb
     4  
     5  import (
     6  	context "context"
     7  	grpc "google.golang.org/grpc"
     8  	codes "google.golang.org/grpc/codes"
     9  	status "google.golang.org/grpc/status"
    10  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    11  )
    12  
    13  // This is a compile-time assertion to ensure that this generated file
    14  // is compatible with the grpc package it is being compiled against.
    15  // Requires gRPC-Go v1.32.0 or later.
    16  const _ = grpc.SupportPackageIsVersion7
    17  
    18  // DiscoveryClient is the client API for Discovery service.
    19  //
    20  // 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.
    21  type DiscoveryClient interface {
    22  	RegisterExecutor(ctx context.Context, in *RegisterExecutorRequest, opts ...grpc.CallOption) (*Executor, error)
    23  	// ListExecutors lists all executors.
    24  	// Executors will use this API to discover other executors.
    25  	// Currently, we assume that there aren't too many executors.
    26  	// If the number of executors becomes very large in the future,
    27  	// we can consider a mechanism to watch the changes of the executors.
    28  	ListExecutors(ctx context.Context, in *ListExecutorsRequest, opts ...grpc.CallOption) (*ListExecutorsResponse, error)
    29  	ListMasters(ctx context.Context, in *ListMastersRequest, opts ...grpc.CallOption) (*ListMastersResponse, error)
    30  	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
    31  	// QueryMetaStore queries metastore manager and returns the information of a matching metastore.
    32  	QueryMetaStore(ctx context.Context, in *QueryMetaStoreRequest, opts ...grpc.CallOption) (*QueryMetaStoreResponse, error)
    33  	// QueryStorageConfig queries and returns external storage config.
    34  	QueryStorageConfig(ctx context.Context, in *QueryStorageConfigRequest, opts ...grpc.CallOption) (*QueryStorageConfigResponse, error)
    35  	GetLeader(ctx context.Context, in *GetLeaderRequest, opts ...grpc.CallOption) (*GetLeaderResponse, error)
    36  	ResignLeader(ctx context.Context, in *ResignLeaderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    37  }
    38  
    39  type discoveryClient struct {
    40  	cc grpc.ClientConnInterface
    41  }
    42  
    43  func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient {
    44  	return &discoveryClient{cc}
    45  }
    46  
    47  func (c *discoveryClient) RegisterExecutor(ctx context.Context, in *RegisterExecutorRequest, opts ...grpc.CallOption) (*Executor, error) {
    48  	out := new(Executor)
    49  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/RegisterExecutor", in, out, opts...)
    50  	if err != nil {
    51  		return nil, err
    52  	}
    53  	return out, nil
    54  }
    55  
    56  func (c *discoveryClient) ListExecutors(ctx context.Context, in *ListExecutorsRequest, opts ...grpc.CallOption) (*ListExecutorsResponse, error) {
    57  	out := new(ListExecutorsResponse)
    58  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/ListExecutors", in, out, opts...)
    59  	if err != nil {
    60  		return nil, err
    61  	}
    62  	return out, nil
    63  }
    64  
    65  func (c *discoveryClient) ListMasters(ctx context.Context, in *ListMastersRequest, opts ...grpc.CallOption) (*ListMastersResponse, error) {
    66  	out := new(ListMastersResponse)
    67  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/ListMasters", in, out, opts...)
    68  	if err != nil {
    69  		return nil, err
    70  	}
    71  	return out, nil
    72  }
    73  
    74  func (c *discoveryClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) {
    75  	out := new(HeartbeatResponse)
    76  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/Heartbeat", in, out, opts...)
    77  	if err != nil {
    78  		return nil, err
    79  	}
    80  	return out, nil
    81  }
    82  
    83  func (c *discoveryClient) QueryMetaStore(ctx context.Context, in *QueryMetaStoreRequest, opts ...grpc.CallOption) (*QueryMetaStoreResponse, error) {
    84  	out := new(QueryMetaStoreResponse)
    85  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/QueryMetaStore", in, out, opts...)
    86  	if err != nil {
    87  		return nil, err
    88  	}
    89  	return out, nil
    90  }
    91  
    92  func (c *discoveryClient) QueryStorageConfig(ctx context.Context, in *QueryStorageConfigRequest, opts ...grpc.CallOption) (*QueryStorageConfigResponse, error) {
    93  	out := new(QueryStorageConfigResponse)
    94  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/QueryStorageConfig", in, out, opts...)
    95  	if err != nil {
    96  		return nil, err
    97  	}
    98  	return out, nil
    99  }
   100  
   101  func (c *discoveryClient) GetLeader(ctx context.Context, in *GetLeaderRequest, opts ...grpc.CallOption) (*GetLeaderResponse, error) {
   102  	out := new(GetLeaderResponse)
   103  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/GetLeader", in, out, opts...)
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	return out, nil
   108  }
   109  
   110  func (c *discoveryClient) ResignLeader(ctx context.Context, in *ResignLeaderRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
   111  	out := new(emptypb.Empty)
   112  	err := c.cc.Invoke(ctx, "/enginepb.Discovery/ResignLeader", in, out, opts...)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return out, nil
   117  }
   118  
   119  // DiscoveryServer is the server API for Discovery service.
   120  // All implementations should embed UnimplementedDiscoveryServer
   121  // for forward compatibility
   122  type DiscoveryServer interface {
   123  	RegisterExecutor(context.Context, *RegisterExecutorRequest) (*Executor, error)
   124  	// ListExecutors lists all executors.
   125  	// Executors will use this API to discover other executors.
   126  	// Currently, we assume that there aren't too many executors.
   127  	// If the number of executors becomes very large in the future,
   128  	// we can consider a mechanism to watch the changes of the executors.
   129  	ListExecutors(context.Context, *ListExecutorsRequest) (*ListExecutorsResponse, error)
   130  	ListMasters(context.Context, *ListMastersRequest) (*ListMastersResponse, error)
   131  	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
   132  	// QueryMetaStore queries metastore manager and returns the information of a matching metastore.
   133  	QueryMetaStore(context.Context, *QueryMetaStoreRequest) (*QueryMetaStoreResponse, error)
   134  	// QueryStorageConfig queries and returns external storage config.
   135  	QueryStorageConfig(context.Context, *QueryStorageConfigRequest) (*QueryStorageConfigResponse, error)
   136  	GetLeader(context.Context, *GetLeaderRequest) (*GetLeaderResponse, error)
   137  	ResignLeader(context.Context, *ResignLeaderRequest) (*emptypb.Empty, error)
   138  }
   139  
   140  // UnimplementedDiscoveryServer should be embedded to have forward compatible implementations.
   141  type UnimplementedDiscoveryServer struct {
   142  }
   143  
   144  func (UnimplementedDiscoveryServer) RegisterExecutor(context.Context, *RegisterExecutorRequest) (*Executor, error) {
   145  	return nil, status.Errorf(codes.Unimplemented, "method RegisterExecutor not implemented")
   146  }
   147  func (UnimplementedDiscoveryServer) ListExecutors(context.Context, *ListExecutorsRequest) (*ListExecutorsResponse, error) {
   148  	return nil, status.Errorf(codes.Unimplemented, "method ListExecutors not implemented")
   149  }
   150  func (UnimplementedDiscoveryServer) ListMasters(context.Context, *ListMastersRequest) (*ListMastersResponse, error) {
   151  	return nil, status.Errorf(codes.Unimplemented, "method ListMasters not implemented")
   152  }
   153  func (UnimplementedDiscoveryServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) {
   154  	return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
   155  }
   156  func (UnimplementedDiscoveryServer) QueryMetaStore(context.Context, *QueryMetaStoreRequest) (*QueryMetaStoreResponse, error) {
   157  	return nil, status.Errorf(codes.Unimplemented, "method QueryMetaStore not implemented")
   158  }
   159  func (UnimplementedDiscoveryServer) QueryStorageConfig(context.Context, *QueryStorageConfigRequest) (*QueryStorageConfigResponse, error) {
   160  	return nil, status.Errorf(codes.Unimplemented, "method QueryStorageConfig not implemented")
   161  }
   162  func (UnimplementedDiscoveryServer) GetLeader(context.Context, *GetLeaderRequest) (*GetLeaderResponse, error) {
   163  	return nil, status.Errorf(codes.Unimplemented, "method GetLeader not implemented")
   164  }
   165  func (UnimplementedDiscoveryServer) ResignLeader(context.Context, *ResignLeaderRequest) (*emptypb.Empty, error) {
   166  	return nil, status.Errorf(codes.Unimplemented, "method ResignLeader not implemented")
   167  }
   168  
   169  // UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service.
   170  // Use of this interface is not recommended, as added methods to DiscoveryServer will
   171  // result in compilation errors.
   172  type UnsafeDiscoveryServer interface {
   173  	mustEmbedUnimplementedDiscoveryServer()
   174  }
   175  
   176  func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer) {
   177  	s.RegisterService(&Discovery_ServiceDesc, srv)
   178  }
   179  
   180  func _Discovery_RegisterExecutor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   181  	in := new(RegisterExecutorRequest)
   182  	if err := dec(in); err != nil {
   183  		return nil, err
   184  	}
   185  	if interceptor == nil {
   186  		return srv.(DiscoveryServer).RegisterExecutor(ctx, in)
   187  	}
   188  	info := &grpc.UnaryServerInfo{
   189  		Server:     srv,
   190  		FullMethod: "/enginepb.Discovery/RegisterExecutor",
   191  	}
   192  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   193  		return srv.(DiscoveryServer).RegisterExecutor(ctx, req.(*RegisterExecutorRequest))
   194  	}
   195  	return interceptor(ctx, in, info, handler)
   196  }
   197  
   198  func _Discovery_ListExecutors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   199  	in := new(ListExecutorsRequest)
   200  	if err := dec(in); err != nil {
   201  		return nil, err
   202  	}
   203  	if interceptor == nil {
   204  		return srv.(DiscoveryServer).ListExecutors(ctx, in)
   205  	}
   206  	info := &grpc.UnaryServerInfo{
   207  		Server:     srv,
   208  		FullMethod: "/enginepb.Discovery/ListExecutors",
   209  	}
   210  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   211  		return srv.(DiscoveryServer).ListExecutors(ctx, req.(*ListExecutorsRequest))
   212  	}
   213  	return interceptor(ctx, in, info, handler)
   214  }
   215  
   216  func _Discovery_ListMasters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   217  	in := new(ListMastersRequest)
   218  	if err := dec(in); err != nil {
   219  		return nil, err
   220  	}
   221  	if interceptor == nil {
   222  		return srv.(DiscoveryServer).ListMasters(ctx, in)
   223  	}
   224  	info := &grpc.UnaryServerInfo{
   225  		Server:     srv,
   226  		FullMethod: "/enginepb.Discovery/ListMasters",
   227  	}
   228  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   229  		return srv.(DiscoveryServer).ListMasters(ctx, req.(*ListMastersRequest))
   230  	}
   231  	return interceptor(ctx, in, info, handler)
   232  }
   233  
   234  func _Discovery_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   235  	in := new(HeartbeatRequest)
   236  	if err := dec(in); err != nil {
   237  		return nil, err
   238  	}
   239  	if interceptor == nil {
   240  		return srv.(DiscoveryServer).Heartbeat(ctx, in)
   241  	}
   242  	info := &grpc.UnaryServerInfo{
   243  		Server:     srv,
   244  		FullMethod: "/enginepb.Discovery/Heartbeat",
   245  	}
   246  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   247  		return srv.(DiscoveryServer).Heartbeat(ctx, req.(*HeartbeatRequest))
   248  	}
   249  	return interceptor(ctx, in, info, handler)
   250  }
   251  
   252  func _Discovery_QueryMetaStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   253  	in := new(QueryMetaStoreRequest)
   254  	if err := dec(in); err != nil {
   255  		return nil, err
   256  	}
   257  	if interceptor == nil {
   258  		return srv.(DiscoveryServer).QueryMetaStore(ctx, in)
   259  	}
   260  	info := &grpc.UnaryServerInfo{
   261  		Server:     srv,
   262  		FullMethod: "/enginepb.Discovery/QueryMetaStore",
   263  	}
   264  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   265  		return srv.(DiscoveryServer).QueryMetaStore(ctx, req.(*QueryMetaStoreRequest))
   266  	}
   267  	return interceptor(ctx, in, info, handler)
   268  }
   269  
   270  func _Discovery_QueryStorageConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   271  	in := new(QueryStorageConfigRequest)
   272  	if err := dec(in); err != nil {
   273  		return nil, err
   274  	}
   275  	if interceptor == nil {
   276  		return srv.(DiscoveryServer).QueryStorageConfig(ctx, in)
   277  	}
   278  	info := &grpc.UnaryServerInfo{
   279  		Server:     srv,
   280  		FullMethod: "/enginepb.Discovery/QueryStorageConfig",
   281  	}
   282  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   283  		return srv.(DiscoveryServer).QueryStorageConfig(ctx, req.(*QueryStorageConfigRequest))
   284  	}
   285  	return interceptor(ctx, in, info, handler)
   286  }
   287  
   288  func _Discovery_GetLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   289  	in := new(GetLeaderRequest)
   290  	if err := dec(in); err != nil {
   291  		return nil, err
   292  	}
   293  	if interceptor == nil {
   294  		return srv.(DiscoveryServer).GetLeader(ctx, in)
   295  	}
   296  	info := &grpc.UnaryServerInfo{
   297  		Server:     srv,
   298  		FullMethod: "/enginepb.Discovery/GetLeader",
   299  	}
   300  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   301  		return srv.(DiscoveryServer).GetLeader(ctx, req.(*GetLeaderRequest))
   302  	}
   303  	return interceptor(ctx, in, info, handler)
   304  }
   305  
   306  func _Discovery_ResignLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   307  	in := new(ResignLeaderRequest)
   308  	if err := dec(in); err != nil {
   309  		return nil, err
   310  	}
   311  	if interceptor == nil {
   312  		return srv.(DiscoveryServer).ResignLeader(ctx, in)
   313  	}
   314  	info := &grpc.UnaryServerInfo{
   315  		Server:     srv,
   316  		FullMethod: "/enginepb.Discovery/ResignLeader",
   317  	}
   318  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   319  		return srv.(DiscoveryServer).ResignLeader(ctx, req.(*ResignLeaderRequest))
   320  	}
   321  	return interceptor(ctx, in, info, handler)
   322  }
   323  
   324  // Discovery_ServiceDesc is the grpc.ServiceDesc for Discovery service.
   325  // It's only intended for direct use with grpc.RegisterService,
   326  // and not to be introspected or modified (even as a copy)
   327  var Discovery_ServiceDesc = grpc.ServiceDesc{
   328  	ServiceName: "enginepb.Discovery",
   329  	HandlerType: (*DiscoveryServer)(nil),
   330  	Methods: []grpc.MethodDesc{
   331  		{
   332  			MethodName: "RegisterExecutor",
   333  			Handler:    _Discovery_RegisterExecutor_Handler,
   334  		},
   335  		{
   336  			MethodName: "ListExecutors",
   337  			Handler:    _Discovery_ListExecutors_Handler,
   338  		},
   339  		{
   340  			MethodName: "ListMasters",
   341  			Handler:    _Discovery_ListMasters_Handler,
   342  		},
   343  		{
   344  			MethodName: "Heartbeat",
   345  			Handler:    _Discovery_Heartbeat_Handler,
   346  		},
   347  		{
   348  			MethodName: "QueryMetaStore",
   349  			Handler:    _Discovery_QueryMetaStore_Handler,
   350  		},
   351  		{
   352  			MethodName: "QueryStorageConfig",
   353  			Handler:    _Discovery_QueryStorageConfig_Handler,
   354  		},
   355  		{
   356  			MethodName: "GetLeader",
   357  			Handler:    _Discovery_GetLeader_Handler,
   358  		},
   359  		{
   360  			MethodName: "ResignLeader",
   361  			Handler:    _Discovery_ResignLeader_Handler,
   362  		},
   363  	},
   364  	Streams:  []grpc.StreamDesc{},
   365  	Metadata: "engine/proto/master.proto",
   366  }
   367  
   368  // TaskSchedulerClient is the client API for TaskScheduler service.
   369  //
   370  // 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.
   371  type TaskSchedulerClient interface {
   372  	ScheduleTask(ctx context.Context, in *ScheduleTaskRequest, opts ...grpc.CallOption) (*ScheduleTaskResponse, error)
   373  }
   374  
   375  type taskSchedulerClient struct {
   376  	cc grpc.ClientConnInterface
   377  }
   378  
   379  func NewTaskSchedulerClient(cc grpc.ClientConnInterface) TaskSchedulerClient {
   380  	return &taskSchedulerClient{cc}
   381  }
   382  
   383  func (c *taskSchedulerClient) ScheduleTask(ctx context.Context, in *ScheduleTaskRequest, opts ...grpc.CallOption) (*ScheduleTaskResponse, error) {
   384  	out := new(ScheduleTaskResponse)
   385  	err := c.cc.Invoke(ctx, "/enginepb.TaskScheduler/ScheduleTask", in, out, opts...)
   386  	if err != nil {
   387  		return nil, err
   388  	}
   389  	return out, nil
   390  }
   391  
   392  // TaskSchedulerServer is the server API for TaskScheduler service.
   393  // All implementations should embed UnimplementedTaskSchedulerServer
   394  // for forward compatibility
   395  type TaskSchedulerServer interface {
   396  	ScheduleTask(context.Context, *ScheduleTaskRequest) (*ScheduleTaskResponse, error)
   397  }
   398  
   399  // UnimplementedTaskSchedulerServer should be embedded to have forward compatible implementations.
   400  type UnimplementedTaskSchedulerServer struct {
   401  }
   402  
   403  func (UnimplementedTaskSchedulerServer) ScheduleTask(context.Context, *ScheduleTaskRequest) (*ScheduleTaskResponse, error) {
   404  	return nil, status.Errorf(codes.Unimplemented, "method ScheduleTask not implemented")
   405  }
   406  
   407  // UnsafeTaskSchedulerServer may be embedded to opt out of forward compatibility for this service.
   408  // Use of this interface is not recommended, as added methods to TaskSchedulerServer will
   409  // result in compilation errors.
   410  type UnsafeTaskSchedulerServer interface {
   411  	mustEmbedUnimplementedTaskSchedulerServer()
   412  }
   413  
   414  func RegisterTaskSchedulerServer(s grpc.ServiceRegistrar, srv TaskSchedulerServer) {
   415  	s.RegisterService(&TaskScheduler_ServiceDesc, srv)
   416  }
   417  
   418  func _TaskScheduler_ScheduleTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   419  	in := new(ScheduleTaskRequest)
   420  	if err := dec(in); err != nil {
   421  		return nil, err
   422  	}
   423  	if interceptor == nil {
   424  		return srv.(TaskSchedulerServer).ScheduleTask(ctx, in)
   425  	}
   426  	info := &grpc.UnaryServerInfo{
   427  		Server:     srv,
   428  		FullMethod: "/enginepb.TaskScheduler/ScheduleTask",
   429  	}
   430  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   431  		return srv.(TaskSchedulerServer).ScheduleTask(ctx, req.(*ScheduleTaskRequest))
   432  	}
   433  	return interceptor(ctx, in, info, handler)
   434  }
   435  
   436  // TaskScheduler_ServiceDesc is the grpc.ServiceDesc for TaskScheduler service.
   437  // It's only intended for direct use with grpc.RegisterService,
   438  // and not to be introspected or modified (even as a copy)
   439  var TaskScheduler_ServiceDesc = grpc.ServiceDesc{
   440  	ServiceName: "enginepb.TaskScheduler",
   441  	HandlerType: (*TaskSchedulerServer)(nil),
   442  	Methods: []grpc.MethodDesc{
   443  		{
   444  			MethodName: "ScheduleTask",
   445  			Handler:    _TaskScheduler_ScheduleTask_Handler,
   446  		},
   447  	},
   448  	Streams:  []grpc.StreamDesc{},
   449  	Metadata: "engine/proto/master.proto",
   450  }
   451  
   452  // JobManagerClient is the client API for JobManager service.
   453  //
   454  // 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.
   455  type JobManagerClient interface {
   456  	CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error)
   457  	GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error)
   458  	ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error)
   459  	// NOTE: for the compatibility of existing openapi(ticdc) format,
   460  	// we use `/cancel` but not `:cancel`(google api suggested)
   461  	// refer to: https://cloud.google.com/apis/design/custom_methods
   462  	CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*Job, error)
   463  	DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
   464  }
   465  
   466  type jobManagerClient struct {
   467  	cc grpc.ClientConnInterface
   468  }
   469  
   470  func NewJobManagerClient(cc grpc.ClientConnInterface) JobManagerClient {
   471  	return &jobManagerClient{cc}
   472  }
   473  
   474  func (c *jobManagerClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) {
   475  	out := new(Job)
   476  	err := c.cc.Invoke(ctx, "/enginepb.JobManager/CreateJob", in, out, opts...)
   477  	if err != nil {
   478  		return nil, err
   479  	}
   480  	return out, nil
   481  }
   482  
   483  func (c *jobManagerClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) {
   484  	out := new(Job)
   485  	err := c.cc.Invoke(ctx, "/enginepb.JobManager/GetJob", in, out, opts...)
   486  	if err != nil {
   487  		return nil, err
   488  	}
   489  	return out, nil
   490  }
   491  
   492  func (c *jobManagerClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) {
   493  	out := new(ListJobsResponse)
   494  	err := c.cc.Invoke(ctx, "/enginepb.JobManager/ListJobs", in, out, opts...)
   495  	if err != nil {
   496  		return nil, err
   497  	}
   498  	return out, nil
   499  }
   500  
   501  func (c *jobManagerClient) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*Job, error) {
   502  	out := new(Job)
   503  	err := c.cc.Invoke(ctx, "/enginepb.JobManager/CancelJob", in, out, opts...)
   504  	if err != nil {
   505  		return nil, err
   506  	}
   507  	return out, nil
   508  }
   509  
   510  func (c *jobManagerClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
   511  	out := new(emptypb.Empty)
   512  	err := c.cc.Invoke(ctx, "/enginepb.JobManager/DeleteJob", in, out, opts...)
   513  	if err != nil {
   514  		return nil, err
   515  	}
   516  	return out, nil
   517  }
   518  
   519  // JobManagerServer is the server API for JobManager service.
   520  // All implementations should embed UnimplementedJobManagerServer
   521  // for forward compatibility
   522  type JobManagerServer interface {
   523  	CreateJob(context.Context, *CreateJobRequest) (*Job, error)
   524  	GetJob(context.Context, *GetJobRequest) (*Job, error)
   525  	ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error)
   526  	// NOTE: for the compatibility of existing openapi(ticdc) format,
   527  	// we use `/cancel` but not `:cancel`(google api suggested)
   528  	// refer to: https://cloud.google.com/apis/design/custom_methods
   529  	CancelJob(context.Context, *CancelJobRequest) (*Job, error)
   530  	DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error)
   531  }
   532  
   533  // UnimplementedJobManagerServer should be embedded to have forward compatible implementations.
   534  type UnimplementedJobManagerServer struct {
   535  }
   536  
   537  func (UnimplementedJobManagerServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error) {
   538  	return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented")
   539  }
   540  func (UnimplementedJobManagerServer) GetJob(context.Context, *GetJobRequest) (*Job, error) {
   541  	return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented")
   542  }
   543  func (UnimplementedJobManagerServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) {
   544  	return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented")
   545  }
   546  func (UnimplementedJobManagerServer) CancelJob(context.Context, *CancelJobRequest) (*Job, error) {
   547  	return nil, status.Errorf(codes.Unimplemented, "method CancelJob not implemented")
   548  }
   549  func (UnimplementedJobManagerServer) DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error) {
   550  	return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented")
   551  }
   552  
   553  // UnsafeJobManagerServer may be embedded to opt out of forward compatibility for this service.
   554  // Use of this interface is not recommended, as added methods to JobManagerServer will
   555  // result in compilation errors.
   556  type UnsafeJobManagerServer interface {
   557  	mustEmbedUnimplementedJobManagerServer()
   558  }
   559  
   560  func RegisterJobManagerServer(s grpc.ServiceRegistrar, srv JobManagerServer) {
   561  	s.RegisterService(&JobManager_ServiceDesc, srv)
   562  }
   563  
   564  func _JobManager_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   565  	in := new(CreateJobRequest)
   566  	if err := dec(in); err != nil {
   567  		return nil, err
   568  	}
   569  	if interceptor == nil {
   570  		return srv.(JobManagerServer).CreateJob(ctx, in)
   571  	}
   572  	info := &grpc.UnaryServerInfo{
   573  		Server:     srv,
   574  		FullMethod: "/enginepb.JobManager/CreateJob",
   575  	}
   576  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   577  		return srv.(JobManagerServer).CreateJob(ctx, req.(*CreateJobRequest))
   578  	}
   579  	return interceptor(ctx, in, info, handler)
   580  }
   581  
   582  func _JobManager_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   583  	in := new(GetJobRequest)
   584  	if err := dec(in); err != nil {
   585  		return nil, err
   586  	}
   587  	if interceptor == nil {
   588  		return srv.(JobManagerServer).GetJob(ctx, in)
   589  	}
   590  	info := &grpc.UnaryServerInfo{
   591  		Server:     srv,
   592  		FullMethod: "/enginepb.JobManager/GetJob",
   593  	}
   594  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   595  		return srv.(JobManagerServer).GetJob(ctx, req.(*GetJobRequest))
   596  	}
   597  	return interceptor(ctx, in, info, handler)
   598  }
   599  
   600  func _JobManager_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   601  	in := new(ListJobsRequest)
   602  	if err := dec(in); err != nil {
   603  		return nil, err
   604  	}
   605  	if interceptor == nil {
   606  		return srv.(JobManagerServer).ListJobs(ctx, in)
   607  	}
   608  	info := &grpc.UnaryServerInfo{
   609  		Server:     srv,
   610  		FullMethod: "/enginepb.JobManager/ListJobs",
   611  	}
   612  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   613  		return srv.(JobManagerServer).ListJobs(ctx, req.(*ListJobsRequest))
   614  	}
   615  	return interceptor(ctx, in, info, handler)
   616  }
   617  
   618  func _JobManager_CancelJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   619  	in := new(CancelJobRequest)
   620  	if err := dec(in); err != nil {
   621  		return nil, err
   622  	}
   623  	if interceptor == nil {
   624  		return srv.(JobManagerServer).CancelJob(ctx, in)
   625  	}
   626  	info := &grpc.UnaryServerInfo{
   627  		Server:     srv,
   628  		FullMethod: "/enginepb.JobManager/CancelJob",
   629  	}
   630  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   631  		return srv.(JobManagerServer).CancelJob(ctx, req.(*CancelJobRequest))
   632  	}
   633  	return interceptor(ctx, in, info, handler)
   634  }
   635  
   636  func _JobManager_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   637  	in := new(DeleteJobRequest)
   638  	if err := dec(in); err != nil {
   639  		return nil, err
   640  	}
   641  	if interceptor == nil {
   642  		return srv.(JobManagerServer).DeleteJob(ctx, in)
   643  	}
   644  	info := &grpc.UnaryServerInfo{
   645  		Server:     srv,
   646  		FullMethod: "/enginepb.JobManager/DeleteJob",
   647  	}
   648  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   649  		return srv.(JobManagerServer).DeleteJob(ctx, req.(*DeleteJobRequest))
   650  	}
   651  	return interceptor(ctx, in, info, handler)
   652  }
   653  
   654  // JobManager_ServiceDesc is the grpc.ServiceDesc for JobManager service.
   655  // It's only intended for direct use with grpc.RegisterService,
   656  // and not to be introspected or modified (even as a copy)
   657  var JobManager_ServiceDesc = grpc.ServiceDesc{
   658  	ServiceName: "enginepb.JobManager",
   659  	HandlerType: (*JobManagerServer)(nil),
   660  	Methods: []grpc.MethodDesc{
   661  		{
   662  			MethodName: "CreateJob",
   663  			Handler:    _JobManager_CreateJob_Handler,
   664  		},
   665  		{
   666  			MethodName: "GetJob",
   667  			Handler:    _JobManager_GetJob_Handler,
   668  		},
   669  		{
   670  			MethodName: "ListJobs",
   671  			Handler:    _JobManager_ListJobs_Handler,
   672  		},
   673  		{
   674  			MethodName: "CancelJob",
   675  			Handler:    _JobManager_CancelJob_Handler,
   676  		},
   677  		{
   678  			MethodName: "DeleteJob",
   679  			Handler:    _JobManager_DeleteJob_Handler,
   680  		},
   681  	},
   682  	Streams:  []grpc.StreamDesc{},
   683  	Metadata: "engine/proto/master.proto",
   684  }