| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| |
| package migrationpb |
| |
| import ( |
| context "context" |
| empty "github.com/golang/protobuf/ptypes/empty" |
| 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. |
| const _ = grpc.SupportPackageIsVersion7 |
| |
| // MigrationClient is the client API for Migration 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. |
| type MigrationClient interface { |
| // ReportRuns notifies CV of the Runs CQDaemon is currently working with. |
| // |
| // Used to determine whether CV's view of the world matches that of CQDaemon. |
| // Initially, this is just FYI for CV. |
| ReportRuns(ctx context.Context, in *ReportRunsRequest, opts ...grpc.CallOption) (*empty.Empty, error) |
| // ReportFinishedRun notifies CV of the Run CQDaemon has just finalized. |
| ReportFinishedRun(ctx context.Context, in *ReportFinishedRunRequest, opts ...grpc.CallOption) (*empty.Empty, error) |
| // ReportUsedNetrc notifies CV of the legacy .netrc credentials used by |
| // CQDaemon. |
| ReportUsedNetrc(ctx context.Context, in *ReportUsedNetrcRequest, opts ...grpc.CallOption) (*empty.Empty, error) |
| } |
| |
| type migrationClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewMigrationClient(cc grpc.ClientConnInterface) MigrationClient { |
| return &migrationClient{cc} |
| } |
| |
| func (c *migrationClient) ReportRuns(ctx context.Context, in *ReportRunsRequest, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/migration.Migration/ReportRuns", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *migrationClient) ReportFinishedRun(ctx context.Context, in *ReportFinishedRunRequest, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/migration.Migration/ReportFinishedRun", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *migrationClient) ReportUsedNetrc(ctx context.Context, in *ReportUsedNetrcRequest, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/migration.Migration/ReportUsedNetrc", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // MigrationServer is the server API for Migration service. |
| // All implementations must embed UnimplementedMigrationServer |
| // for forward compatibility |
| type MigrationServer interface { |
| // ReportRuns notifies CV of the Runs CQDaemon is currently working with. |
| // |
| // Used to determine whether CV's view of the world matches that of CQDaemon. |
| // Initially, this is just FYI for CV. |
| ReportRuns(context.Context, *ReportRunsRequest) (*empty.Empty, error) |
| // ReportFinishedRun notifies CV of the Run CQDaemon has just finalized. |
| ReportFinishedRun(context.Context, *ReportFinishedRunRequest) (*empty.Empty, error) |
| // ReportUsedNetrc notifies CV of the legacy .netrc credentials used by |
| // CQDaemon. |
| ReportUsedNetrc(context.Context, *ReportUsedNetrcRequest) (*empty.Empty, error) |
| mustEmbedUnimplementedMigrationServer() |
| } |
| |
| // UnimplementedMigrationServer must be embedded to have forward compatible implementations. |
| type UnimplementedMigrationServer struct { |
| } |
| |
| func (UnimplementedMigrationServer) ReportRuns(context.Context, *ReportRunsRequest) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ReportRuns not implemented") |
| } |
| func (UnimplementedMigrationServer) ReportFinishedRun(context.Context, *ReportFinishedRunRequest) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ReportFinishedRun not implemented") |
| } |
| func (UnimplementedMigrationServer) ReportUsedNetrc(context.Context, *ReportUsedNetrcRequest) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ReportUsedNetrc not implemented") |
| } |
| func (UnimplementedMigrationServer) mustEmbedUnimplementedMigrationServer() {} |
| |
| // UnsafeMigrationServer may be embedded to opt out of forward compatibility for this service. |
| // Use of this interface is not recommended, as added methods to MigrationServer will |
| // result in compilation errors. |
| type UnsafeMigrationServer interface { |
| mustEmbedUnimplementedMigrationServer() |
| } |
| |
| func RegisterMigrationServer(s grpc.ServiceRegistrar, srv MigrationServer) { |
| s.RegisterService(&_Migration_serviceDesc, srv) |
| } |
| |
| func _Migration_ReportRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ReportRunsRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(MigrationServer).ReportRuns(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/migration.Migration/ReportRuns", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(MigrationServer).ReportRuns(ctx, req.(*ReportRunsRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Migration_ReportFinishedRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ReportFinishedRunRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(MigrationServer).ReportFinishedRun(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/migration.Migration/ReportFinishedRun", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(MigrationServer).ReportFinishedRun(ctx, req.(*ReportFinishedRunRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _Migration_ReportUsedNetrc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ReportUsedNetrcRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(MigrationServer).ReportUsedNetrc(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/migration.Migration/ReportUsedNetrc", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(MigrationServer).ReportUsedNetrc(ctx, req.(*ReportUsedNetrcRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _Migration_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "migration.Migration", |
| HandlerType: (*MigrationServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "ReportRuns", |
| Handler: _Migration_ReportRuns_Handler, |
| }, |
| { |
| MethodName: "ReportFinishedRun", |
| Handler: _Migration_ReportFinishedRun_Handler, |
| }, |
| { |
| MethodName: "ReportUsedNetrc", |
| Handler: _Migration_ReportUsedNetrc_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "go.chromium.org/luci/cv/api/migration/migration.proto", |
| } |