// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.24.2 // source: downloader/downloader.proto package downloader import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 const ( Downloader_ProhibitNewDownloads_FullMethodName = "/downloader.Downloader/ProhibitNewDownloads" Downloader_Add_FullMethodName = "/downloader.Downloader/Add" Downloader_Delete_FullMethodName = "/downloader.Downloader/Delete" Downloader_Verify_FullMethodName = "/downloader.Downloader/Verify" Downloader_Stats_FullMethodName = "/downloader.Downloader/Stats" ) // DownloaderClient is the client API for Downloader 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 DownloaderClient interface { // Erigon "download once" - means restart/upgrade/downgrade will not download files (and will be fast) // After "download once" - Erigon will produce and seed new files // Downloader will able: seed new files (already existing on FS), download uncomplete parts of existing files (if Verify found some bad parts) ProhibitNewDownloads(ctx context.Context, in *ProhibitNewDownloadsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Adding new file to downloader: non-existing files it will download, existing - seed Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Trigger verification of files // If some part of file is bad - such part will be re-downloaded (without returning error) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error) } type downloaderClient struct { cc grpc.ClientConnInterface } func NewDownloaderClient(cc grpc.ClientConnInterface) DownloaderClient { return &downloaderClient{cc} } func (c *downloaderClient) ProhibitNewDownloads(ctx context.Context, in *ProhibitNewDownloadsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Downloader_ProhibitNewDownloads_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *downloaderClient) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Downloader_Add_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *downloaderClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Downloader_Delete_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *downloaderClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Downloader_Verify_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *downloaderClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error) { out := new(StatsReply) err := c.cc.Invoke(ctx, Downloader_Stats_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // DownloaderServer is the server API for Downloader service. // All implementations must embed UnimplementedDownloaderServer // for forward compatibility type DownloaderServer interface { // Erigon "download once" - means restart/upgrade/downgrade will not download files (and will be fast) // After "download once" - Erigon will produce and seed new files // Downloader will able: seed new files (already existing on FS), download uncomplete parts of existing files (if Verify found some bad parts) ProhibitNewDownloads(context.Context, *ProhibitNewDownloadsRequest) (*emptypb.Empty, error) // Adding new file to downloader: non-existing files it will download, existing - seed Add(context.Context, *AddRequest) (*emptypb.Empty, error) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) // Trigger verification of files // If some part of file is bad - such part will be re-downloaded (without returning error) Verify(context.Context, *VerifyRequest) (*emptypb.Empty, error) Stats(context.Context, *StatsRequest) (*StatsReply, error) mustEmbedUnimplementedDownloaderServer() } // UnimplementedDownloaderServer must be embedded to have forward compatible implementations. type UnimplementedDownloaderServer struct { } func (UnimplementedDownloaderServer) ProhibitNewDownloads(context.Context, *ProhibitNewDownloadsRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ProhibitNewDownloads not implemented") } func (UnimplementedDownloaderServer) Add(context.Context, *AddRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") } func (UnimplementedDownloaderServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedDownloaderServer) Verify(context.Context, *VerifyRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") } func (UnimplementedDownloaderServer) Stats(context.Context, *StatsRequest) (*StatsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Stats not implemented") } func (UnimplementedDownloaderServer) mustEmbedUnimplementedDownloaderServer() {} // UnsafeDownloaderServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DownloaderServer will // result in compilation errors. type UnsafeDownloaderServer interface { mustEmbedUnimplementedDownloaderServer() } func RegisterDownloaderServer(s grpc.ServiceRegistrar, srv DownloaderServer) { s.RegisterService(&Downloader_ServiceDesc, srv) } func _Downloader_ProhibitNewDownloads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProhibitNewDownloadsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DownloaderServer).ProhibitNewDownloads(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Downloader_ProhibitNewDownloads_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DownloaderServer).ProhibitNewDownloads(ctx, req.(*ProhibitNewDownloadsRequest)) } return interceptor(ctx, in, info, handler) } func _Downloader_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DownloaderServer).Add(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Downloader_Add_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DownloaderServer).Add(ctx, req.(*AddRequest)) } return interceptor(ctx, in, info, handler) } func _Downloader_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DownloaderServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Downloader_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DownloaderServer).Delete(ctx, req.(*DeleteRequest)) } return interceptor(ctx, in, info, handler) } func _Downloader_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DownloaderServer).Verify(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Downloader_Verify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DownloaderServer).Verify(ctx, req.(*VerifyRequest)) } return interceptor(ctx, in, info, handler) } func _Downloader_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StatsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DownloaderServer).Stats(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Downloader_Stats_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DownloaderServer).Stats(ctx, req.(*StatsRequest)) } return interceptor(ctx, in, info, handler) } // Downloader_ServiceDesc is the grpc.ServiceDesc for Downloader service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Downloader_ServiceDesc = grpc.ServiceDesc{ ServiceName: "downloader.Downloader", HandlerType: (*DownloaderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ProhibitNewDownloads", Handler: _Downloader_ProhibitNewDownloads_Handler, }, { MethodName: "Add", Handler: _Downloader_Add_Handler, }, { MethodName: "Delete", Handler: _Downloader_Delete_Handler, }, { MethodName: "Verify", Handler: _Downloader_Verify_Handler, }, { MethodName: "Stats", Handler: _Downloader_Stats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "downloader/downloader.proto", }