mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
6464da7670
* save state * save state * save state * refactoring * fix * save state * save state * fmt * fix lint * restore torrents for external downloader * fix lint * download * skip debug test * debug * remote debug * small cli fixes * skip debug test * external snapshot predownloader * get rid of remote downloader * fix lint * clean makefile * fix lint * fix lint * cleanup * fix ci * fmt * remove proto from interfaces * Squashed 'interfaces/' content from commit acd02bb94 git-subtree-dir: interfaces git-subtree-split: acd02bb94c5a421aa8f8d1fd76cd8aad668e9fcb
20 lines
538 B
Go
20 lines
538 B
Go
package snapshotsync
|
|
|
|
import "google.golang.org/grpc"
|
|
|
|
//go:generate ls ./../../interfaces/snapshot_downloader
|
|
//go:generate protoc --go_out=. --go-grpc_out=. --proto_path=./../../interfaces/snapshot_downloader "external_downloader.proto" -I=. -I=./../../build/include/google
|
|
|
|
func NewClient(addr string) (DownloaderClient, func() error, error) {
|
|
opts := []grpc.DialOption{
|
|
grpc.WithInsecure(),
|
|
}
|
|
|
|
conn, err := grpc.Dial(addr, opts...)
|
|
if err != nil {
|
|
return nil, nil, err
|
|
}
|
|
|
|
return NewDownloaderClient(conn), conn.Close, nil
|
|
}
|