erigon-pulse/direct/downloader_client.go

28 lines
950 B
Go
Raw Normal View History

package direct
import (
"context"
proto_downloader "github.com/ledgerwatch/erigon-lib/gointerfaces/downloader"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"
)
2022-02-12 11:48:42 +00:00
type DownloaderClient struct {
server proto_downloader.DownloaderServer
}
2022-02-12 11:48:42 +00:00
func NewDownloaderClient(server proto_downloader.DownloaderServer) *DownloaderClient {
return &DownloaderClient{server: server}
}
2022-02-12 11:48:42 +00:00
func (c *DownloaderClient) Download(ctx context.Context, in *proto_downloader.DownloadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
return c.server.Download(ctx, in)
}
2022-07-01 04:20:32 +00:00
func (c *DownloaderClient) Verify(ctx context.Context, in *proto_downloader.VerifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
return c.server.Verify(ctx, in)
}
2022-02-12 11:48:42 +00:00
func (c *DownloaderClient) Stats(ctx context.Context, in *proto_downloader.StatsRequest, opts ...grpc.CallOption) (*proto_downloader.StatsReply, error) {
return c.server.Stats(ctx, in)
}