allow to set http client

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-02-16 14:59:35 +03:00
parent c3c1afa03f
commit c0ef0763bf
2 changed files with 12 additions and 0 deletions

View File

@@ -1,12 +1,19 @@
package vault
import (
"net/http"
"time"
"github.com/hashicorp/vault/api"
"go.unistack.org/micro/v3/config"
)
type httpClientKey struct{}
func HTTPClient(c *http.Client) config.Option {
return config.SetOption(httpClientKey{}, c)
}
type configKey struct{}
func Config(cfg *api.Config) config.Option {