| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| // versions: |
| // - protoc-gen-go-grpc v1.1.0 |
| // - protoc v3.17.1 |
| // source: chromite/api/toolchain.proto |
| |
| package api |
| |
| 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.32.0 or later. |
| const _ = grpc.SupportPackageIsVersion7 |
| |
| // ToolchainServiceClient is the client API for ToolchainService 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 ToolchainServiceClient interface { |
| // TODO(b/187790484): Migrate this to ArtifactsService/BuildSetup. |
| // Prepare to build toolchain artifacts. This will be called twice: |
| // Once with chroot and sysroot = None, before the chroot is created, and |
| // again at the start of the 'install packages' step, if the build gets that |
| // far. Added in R80. |
| PrepareForBuild(ctx context.Context, in *PrepareForToolchainBuildRequest, opts ...grpc.CallOption) (*PrepareForToolchainBuildResponse, error) |
| // TODO(b/187790484): Migrate this to ArtifactsService/Get. |
| // Bundle toolchain artifacts. Added in R80. |
| BundleArtifacts(ctx context.Context, in *BundleToolchainRequest, opts ...grpc.CallOption) (*BundleToolchainResponse, error) |
| // Added in R90. |
| GetUpdatedFiles(ctx context.Context, in *GetUpdatedFilesRequest, opts ...grpc.CallOption) (*GetUpdatedFilesResponse, error) |
| EmergeAndUploadLints(ctx context.Context, in *DashboardLintRequest, opts ...grpc.CallOption) (*DashboardLintResponse, error) |
| // Emerge the given packages and retrieve any findings from linters. |
| EmergeWithLinting(ctx context.Context, in *LinterRequest, opts ...grpc.CallOption) (*LinterResponse, error) |
| // Emerge the given Rust packages and retrieve any findings from Cargo Clippy. |
| // FIXME(b/187790543): remove this endpoint oboleted by "EmergeWithLinting". |
| // This refactor has the following dependency chain: |
| // 1) Create EmergeWithLinting endpoint |
| // 2) Let Recipe Roller update the Build API for recipes |
| // 3) Update the recipe to use EmergeWithLinting |
| // 4) Delete GetClippyLints endpoint |
| GetClippyLints(ctx context.Context, in *LinterRequest, opts ...grpc.CallOption) (*LinterResponse, error) |
| // Get the default and non-default toolchains for a board. |
| GetToolchainsForBoard(ctx context.Context, in *ToolchainsRequest, opts ...grpc.CallOption) (*ToolchainsResponse, error) |
| SetupToolchains(ctx context.Context, in *SetupToolchainsRequest, opts ...grpc.CallOption) (*SetupToolchainsResponse, error) |
| } |
| |
| type toolchainServiceClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewToolchainServiceClient(cc grpc.ClientConnInterface) ToolchainServiceClient { |
| return &toolchainServiceClient{cc} |
| } |
| |
| func (c *toolchainServiceClient) PrepareForBuild(ctx context.Context, in *PrepareForToolchainBuildRequest, opts ...grpc.CallOption) (*PrepareForToolchainBuildResponse, error) { |
| out := new(PrepareForToolchainBuildResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/PrepareForBuild", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) BundleArtifacts(ctx context.Context, in *BundleToolchainRequest, opts ...grpc.CallOption) (*BundleToolchainResponse, error) { |
| out := new(BundleToolchainResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/BundleArtifacts", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) GetUpdatedFiles(ctx context.Context, in *GetUpdatedFilesRequest, opts ...grpc.CallOption) (*GetUpdatedFilesResponse, error) { |
| out := new(GetUpdatedFilesResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/GetUpdatedFiles", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) EmergeAndUploadLints(ctx context.Context, in *DashboardLintRequest, opts ...grpc.CallOption) (*DashboardLintResponse, error) { |
| out := new(DashboardLintResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/EmergeAndUploadLints", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) EmergeWithLinting(ctx context.Context, in *LinterRequest, opts ...grpc.CallOption) (*LinterResponse, error) { |
| out := new(LinterResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/EmergeWithLinting", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) GetClippyLints(ctx context.Context, in *LinterRequest, opts ...grpc.CallOption) (*LinterResponse, error) { |
| out := new(LinterResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/GetClippyLints", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) GetToolchainsForBoard(ctx context.Context, in *ToolchainsRequest, opts ...grpc.CallOption) (*ToolchainsResponse, error) { |
| out := new(ToolchainsResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/GetToolchainsForBoard", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *toolchainServiceClient) SetupToolchains(ctx context.Context, in *SetupToolchainsRequest, opts ...grpc.CallOption) (*SetupToolchainsResponse, error) { |
| out := new(SetupToolchainsResponse) |
| err := c.cc.Invoke(ctx, "/chromite.api.ToolchainService/SetupToolchains", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // ToolchainServiceServer is the server API for ToolchainService service. |
| // All implementations must embed UnimplementedToolchainServiceServer |
| // for forward compatibility |
| type ToolchainServiceServer interface { |
| // TODO(b/187790484): Migrate this to ArtifactsService/BuildSetup. |
| // Prepare to build toolchain artifacts. This will be called twice: |
| // Once with chroot and sysroot = None, before the chroot is created, and |
| // again at the start of the 'install packages' step, if the build gets that |
| // far. Added in R80. |
| PrepareForBuild(context.Context, *PrepareForToolchainBuildRequest) (*PrepareForToolchainBuildResponse, error) |
| // TODO(b/187790484): Migrate this to ArtifactsService/Get. |
| // Bundle toolchain artifacts. Added in R80. |
| BundleArtifacts(context.Context, *BundleToolchainRequest) (*BundleToolchainResponse, error) |
| // Added in R90. |
| GetUpdatedFiles(context.Context, *GetUpdatedFilesRequest) (*GetUpdatedFilesResponse, error) |
| EmergeAndUploadLints(context.Context, *DashboardLintRequest) (*DashboardLintResponse, error) |
| // Emerge the given packages and retrieve any findings from linters. |
| EmergeWithLinting(context.Context, *LinterRequest) (*LinterResponse, error) |
| // Emerge the given Rust packages and retrieve any findings from Cargo Clippy. |
| // FIXME(b/187790543): remove this endpoint oboleted by "EmergeWithLinting". |
| // This refactor has the following dependency chain: |
| // 1) Create EmergeWithLinting endpoint |
| // 2) Let Recipe Roller update the Build API for recipes |
| // 3) Update the recipe to use EmergeWithLinting |
| // 4) Delete GetClippyLints endpoint |
| GetClippyLints(context.Context, *LinterRequest) (*LinterResponse, error) |
| // Get the default and non-default toolchains for a board. |
| GetToolchainsForBoard(context.Context, *ToolchainsRequest) (*ToolchainsResponse, error) |
| SetupToolchains(context.Context, *SetupToolchainsRequest) (*SetupToolchainsResponse, error) |
| mustEmbedUnimplementedToolchainServiceServer() |
| } |
| |
| // UnimplementedToolchainServiceServer must be embedded to have forward compatible implementations. |
| type UnimplementedToolchainServiceServer struct { |
| } |
| |
| func (UnimplementedToolchainServiceServer) PrepareForBuild(context.Context, *PrepareForToolchainBuildRequest) (*PrepareForToolchainBuildResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method PrepareForBuild not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) BundleArtifacts(context.Context, *BundleToolchainRequest) (*BundleToolchainResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method BundleArtifacts not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) GetUpdatedFiles(context.Context, *GetUpdatedFilesRequest) (*GetUpdatedFilesResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method GetUpdatedFiles not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) EmergeAndUploadLints(context.Context, *DashboardLintRequest) (*DashboardLintResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method EmergeAndUploadLints not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) EmergeWithLinting(context.Context, *LinterRequest) (*LinterResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method EmergeWithLinting not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) GetClippyLints(context.Context, *LinterRequest) (*LinterResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method GetClippyLints not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) GetToolchainsForBoard(context.Context, *ToolchainsRequest) (*ToolchainsResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method GetToolchainsForBoard not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) SetupToolchains(context.Context, *SetupToolchainsRequest) (*SetupToolchainsResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method SetupToolchains not implemented") |
| } |
| func (UnimplementedToolchainServiceServer) mustEmbedUnimplementedToolchainServiceServer() {} |
| |
| // UnsafeToolchainServiceServer may be embedded to opt out of forward compatibility for this service. |
| // Use of this interface is not recommended, as added methods to ToolchainServiceServer will |
| // result in compilation errors. |
| type UnsafeToolchainServiceServer interface { |
| mustEmbedUnimplementedToolchainServiceServer() |
| } |
| |
| func RegisterToolchainServiceServer(s grpc.ServiceRegistrar, srv ToolchainServiceServer) { |
| s.RegisterService(&ToolchainService_ServiceDesc, srv) |
| } |
| |
| func _ToolchainService_PrepareForBuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(PrepareForToolchainBuildRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).PrepareForBuild(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/PrepareForBuild", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).PrepareForBuild(ctx, req.(*PrepareForToolchainBuildRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_BundleArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(BundleToolchainRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).BundleArtifacts(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/BundleArtifacts", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).BundleArtifacts(ctx, req.(*BundleToolchainRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_GetUpdatedFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(GetUpdatedFilesRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).GetUpdatedFiles(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/GetUpdatedFiles", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).GetUpdatedFiles(ctx, req.(*GetUpdatedFilesRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_EmergeAndUploadLints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(DashboardLintRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).EmergeAndUploadLints(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/EmergeAndUploadLints", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).EmergeAndUploadLints(ctx, req.(*DashboardLintRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_EmergeWithLinting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(LinterRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).EmergeWithLinting(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/EmergeWithLinting", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).EmergeWithLinting(ctx, req.(*LinterRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_GetClippyLints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(LinterRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).GetClippyLints(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/GetClippyLints", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).GetClippyLints(ctx, req.(*LinterRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_GetToolchainsForBoard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ToolchainsRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).GetToolchainsForBoard(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/GetToolchainsForBoard", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).GetToolchainsForBoard(ctx, req.(*ToolchainsRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ToolchainService_SetupToolchains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(SetupToolchainsRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(ToolchainServiceServer).SetupToolchains(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/chromite.api.ToolchainService/SetupToolchains", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ToolchainServiceServer).SetupToolchains(ctx, req.(*SetupToolchainsRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| // ToolchainService_ServiceDesc is the grpc.ServiceDesc for ToolchainService service. |
| // It's only intended for direct use with grpc.RegisterService, |
| // and not to be introspected or modified (even as a copy) |
| var ToolchainService_ServiceDesc = grpc.ServiceDesc{ |
| ServiceName: "chromite.api.ToolchainService", |
| HandlerType: (*ToolchainServiceServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "PrepareForBuild", |
| Handler: _ToolchainService_PrepareForBuild_Handler, |
| }, |
| { |
| MethodName: "BundleArtifacts", |
| Handler: _ToolchainService_BundleArtifacts_Handler, |
| }, |
| { |
| MethodName: "GetUpdatedFiles", |
| Handler: _ToolchainService_GetUpdatedFiles_Handler, |
| }, |
| { |
| MethodName: "EmergeAndUploadLints", |
| Handler: _ToolchainService_EmergeAndUploadLints_Handler, |
| }, |
| { |
| MethodName: "EmergeWithLinting", |
| Handler: _ToolchainService_EmergeWithLinting_Handler, |
| }, |
| { |
| MethodName: "GetClippyLints", |
| Handler: _ToolchainService_GetClippyLints_Handler, |
| }, |
| { |
| MethodName: "GetToolchainsForBoard", |
| Handler: _ToolchainService_GetToolchainsForBoard_Handler, |
| }, |
| { |
| MethodName: "SetupToolchains", |
| Handler: _ToolchainService_SetupToolchains_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "chromite/api/toolchain.proto", |
| } |