provide timeout option and lower default
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package vault
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/vault/api"
|
||||
"github.com/unistack-org/micro/v3/config"
|
||||
)
|
||||
@@ -40,3 +42,9 @@ type secretIDKey struct{}
|
||||
func SecretID(secret string) config.Option {
|
||||
return config.SetOption(secretIDKey{}, secret)
|
||||
}
|
||||
|
||||
type timeoutKey struct{}
|
||||
|
||||
func Timeout(td time.Duration) config.Option {
|
||||
return config.SetOption(timeoutKey{}, td)
|
||||
}
|
||||
|
Reference in New Issue
Block a user