mirror of
https://github.com/status-im/consul.git
synced 2025-01-18 17:52:17 +00:00
Allows keyring operations on client agents
This commit is contained in:
parent
705f193f3f
commit
e76ca318dc
@ -233,9 +233,6 @@ func decodeStringKey(key string) ([]byte, error) {
|
|||||||
func (a *Agent) keyringProcess(args *structs.KeyringRequest) (*structs.KeyringResponses, error) {
|
func (a *Agent) keyringProcess(args *structs.KeyringRequest) (*structs.KeyringResponses, error) {
|
||||||
var reply structs.KeyringResponses
|
var reply structs.KeyringResponses
|
||||||
|
|
||||||
if _, ok := a.delegate.(*consul.Server); !ok {
|
|
||||||
return nil, fmt.Errorf("keyring operations must run against a server node")
|
|
||||||
}
|
|
||||||
if err := a.RPC("Internal.KeyringOperation", args, &reply); err != nil {
|
if err := a.RPC("Internal.KeyringOperation", args, &reply); err != nil {
|
||||||
return &reply, err
|
return &reply, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user