mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Address feedback on Plugin Reload: OSS Side (#9350)
* just use an error string * Switch command to use new struct
This commit is contained in:
@@ -273,8 +273,7 @@ func (c *Sys) ReloadPlugin(i *ReloadPluginInput) (string, error) {
|
||||
// ReloadStatus is the status of an individual node's plugin reload
|
||||
type ReloadStatus struct {
|
||||
Timestamp time.Time `json:"timestamp" mapstructure:"timestamp"`
|
||||
Success bool `json:"success" mapstructure:"success"`
|
||||
Message string `json:"message" mapstructure:"message"`
|
||||
Error string `json:"error" mapstructure:"error"`
|
||||
}
|
||||
|
||||
// ReloadStatusResponse is the combined response of all known completed plugin reloads
|
||||
|
||||
@@ -83,8 +83,8 @@ func (c *PluginReloadStatusCommand) Run(args []string) int {
|
||||
out = append(out, fmt.Sprintf("%s | %s | %t | %s ",
|
||||
s.Timestamp.Format("15:04:05"),
|
||||
i,
|
||||
s.Success,
|
||||
s.Message))
|
||||
s.Error == "",
|
||||
s.Error))
|
||||
}
|
||||
c.UI.Output(tableOutput(out, nil))
|
||||
return 0
|
||||
|
||||
2
go.mod
2
go.mod
@@ -84,7 +84,7 @@ require (
|
||||
github.com/hashicorp/vault-plugin-secrets-kv v0.5.5
|
||||
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.1.2
|
||||
github.com/hashicorp/vault-plugin-secrets-openldap v0.1.4-0.20200618161832-cae59ebde561
|
||||
github.com/hashicorp/vault/api v1.0.5-0.20200630153159-69a37f1037b5
|
||||
github.com/hashicorp/vault/api v1.0.5-0.20200630205458-1a16f3c699c6
|
||||
github.com/hashicorp/vault/sdk v0.1.14-0.20200527182800-ad90e0b39d2f
|
||||
github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4
|
||||
github.com/jcmturner/gokrb5/v8 v8.0.0
|
||||
|
||||
3
vendor/github.com/hashicorp/vault/api/sys_plugins.go
generated
vendored
3
vendor/github.com/hashicorp/vault/api/sys_plugins.go
generated
vendored
@@ -273,8 +273,7 @@ func (c *Sys) ReloadPlugin(i *ReloadPluginInput) (string, error) {
|
||||
// ReloadStatus is the status of an individual node's plugin reload
|
||||
type ReloadStatus struct {
|
||||
Timestamp time.Time `json:"timestamp" mapstructure:"timestamp"`
|
||||
Success bool `json:"success" mapstructure:"success"`
|
||||
Message string `json:"message" mapstructure:"message"`
|
||||
Error string `json:"error" mapstructure:"error"`
|
||||
}
|
||||
|
||||
// ReloadStatusResponse is the combined response of all known completed plugin reloads
|
||||
|
||||
Reference in New Issue
Block a user