Skip to content

Commit f3675fe

Browse files
author
dgoldenberg
committed
Add support fort consul token
signed-off-by: Damien Goldenberg <[email protected]>
1 parent 791d3fc commit f3675fe

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

store/consul/consul.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ func New(endpoints []string, options *store.Config) (store.Store, error) {
8484
if options.ConnectionTimeout != 0 {
8585
s.setTimeout(options.ConnectionTimeout)
8686
}
87+
if options.Token != nil {
88+
s.config.Token = options.Token
89+
}
8790
}
8891

8992
// Creates a new client

store/store.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type Config struct {
4848
PersistConnection bool
4949
Username string
5050
Password string
51+
Token *string
5152
}
5253

5354
// ClientTLSConfig contains data for a Client TLS configuration in the form

0 commit comments

Comments
 (0)