add missing handler for reloading site replication config on peers (#19042)

This commit is contained in:
Harshavardhana
2024-02-13 06:55:54 -08:00
committed by GitHub
parent 30a466aa71
commit 0c068b15c7
3 changed files with 82 additions and 72 deletions

View File

@@ -540,6 +540,16 @@ func (client *peerRESTClient) LoadGroup(group string) error {
return err
}
func (client *peerRESTClient) ReloadSiteReplicationConfig(ctx context.Context) error {
conn := client.gridConn()
if conn == nil {
return nil
}
_, err := reloadSiteReplicationConfigHandler.Call(ctx, conn, grid.NewMSSWith(map[string]string{}))
return err
}
// VerifyBinary - sends verify binary message to remote peers.
func (client *peerRESTClient) VerifyBinary(ctx context.Context, u *url.URL, sha256Sum []byte, releaseInfo string, reader io.Reader) error {
values := make(url.Values)
@@ -970,15 +980,6 @@ func (client *peerRESTClient) DriveSpeedTest(ctx context.Context, opts madmin.Dr
return result, nil
}
func (client *peerRESTClient) ReloadSiteReplicationConfig(ctx context.Context) error {
respBody, err := client.callWithContext(context.Background(), peerRESTMethodReloadSiteReplicationConfig, nil, nil, -1)
if err != nil {
return err
}
defer xhttp.DrainBody(respBody)
return nil
}
func (client *peerRESTClient) GetLastDayTierStats(ctx context.Context) (DailyAllTierStats, error) {
var result map[string]lastDayTierStats
respBody, err := client.callWithContext(context.Background(), peerRESTMethodGetLastDayTierStats, nil, nil, -1)