mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
feat: update binary once and push it to other servers (#15407)
This commit is contained in:
committed by
GitHub
parent
916f274c83
commit
8ec888d13d
@@ -422,16 +422,18 @@ type binaryInfo struct {
|
||||
URL *url.URL
|
||||
Sha256Sum []byte
|
||||
ReleaseInfo string
|
||||
BinaryFile []byte
|
||||
}
|
||||
|
||||
// DownloadBinary - sends download binary message to remote peers.
|
||||
func (client *peerRESTClient) DownloadBinary(ctx context.Context, u *url.URL, sha256Sum []byte, releaseInfo string) error {
|
||||
// VerifyBinary - sends verify binary message to remote peers.
|
||||
func (client *peerRESTClient) VerifyBinary(ctx context.Context, u *url.URL, sha256Sum []byte, releaseInfo string, readerInput []byte) error {
|
||||
values := make(url.Values)
|
||||
var reader bytes.Buffer
|
||||
if err := gob.NewEncoder(&reader).Encode(binaryInfo{
|
||||
URL: u,
|
||||
Sha256Sum: sha256Sum,
|
||||
ReleaseInfo: releaseInfo,
|
||||
BinaryFile: readerInput,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user