Reload users upon AddUser on peers (#6975)

Also migrate ReloadFormat to notification subsystem,
remove GetConfig() we do not use this API anymore
This commit is contained in:
Harshavardhana
2018-12-18 14:39:21 -08:00
committed by Dee Koder
parent 65ddff8899
commit 4f31a9a33b
11 changed files with 146 additions and 155 deletions
+19 -1
View File
@@ -115,12 +115,30 @@ func (rpcClient *PeerRPCClient) SendEvent(bucketName string, targetID, remoteTar
return err
}
// ReloadFormat - calls reload format RPC.
func (rpcClient *PeerRPCClient) ReloadFormat(dryRun bool) error {
args := ReloadFormatArgs{
DryRun: dryRun,
}
reply := VoidReply{}
return rpcClient.Call(peerServiceName+".ReloadFormat", &args, &reply)
}
// LoadUsers - calls load users RPC.
func (rpcClient *PeerRPCClient) LoadUsers() error {
args := AuthArgs{}
reply := VoidReply{}
return rpcClient.Call(peerServiceName+".LoadUsers", &args, &reply)
}
// LoadCredentials - calls load credentials RPC.
func (rpcClient *PeerRPCClient) LoadCredentials() error {
args := AuthArgs{}
reply := VoidReply{}
return rpcClient.Call(peerServiceName+".SetCredentials", &args, &reply)
return rpcClient.Call(peerServiceName+".LoadCredentials", &args, &reply)
}
// NewPeerRPCClient - returns new peer RPC client.