Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backends/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func New(config Config) (StoreClient, error) {
config.BasicAuth,
config.Username,
config.Password,
config.AuthToken,
)
case "etcd":
// Create the etcd client upfront and use it for the life of the process.
Expand Down
5 changes: 4 additions & 1 deletion backends/consul/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ConsulClient struct {
}

// NewConsulClient returns a new client to Consul for the given address
func New(nodes []string, scheme, cert, key, caCert string, basicAuth bool, username string, password string) (*ConsulClient, error) {
func New(nodes []string, scheme, cert, key, caCert string, basicAuth bool, username string, password string, authToken string) (*ConsulClient, error) {
conf := api.DefaultConfig()

conf.Scheme = scheme
Expand All @@ -36,6 +36,9 @@ func New(nodes []string, scheme, cert, key, caCert string, basicAuth bool, usern
if caCert != "" {
conf.TLSConfig.CAFile = caCert
}
if authToken != "" {
conf.Token = authToken
}

client, err := api.NewClient(conf)
if err != nil {
Expand Down