mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
add token and addr to http flags
This commit is contained in:
parent
e2b686b982
commit
8a0195ee99
@ -65,6 +65,10 @@ func (f *HTTPFlags) ServerFlags() *flag.FlagSet {
|
|||||||
return fs
|
return fs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *HTTPFlags) Addr() string {
|
||||||
|
return f.address.String()
|
||||||
|
}
|
||||||
|
|
||||||
func (f *HTTPFlags) Datacenter() string {
|
func (f *HTTPFlags) Datacenter() string {
|
||||||
return f.datacenter.String()
|
return f.datacenter.String()
|
||||||
}
|
}
|
||||||
@ -76,6 +80,10 @@ func (f *HTTPFlags) Stale() bool {
|
|||||||
return *f.stale.v
|
return *f.stale.v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *HTTPFlags) Token() string {
|
||||||
|
return f.token.String()
|
||||||
|
}
|
||||||
|
|
||||||
func (f *HTTPFlags) APIClient() (*api.Client, error) {
|
func (f *HTTPFlags) APIClient() (*api.Client, error) {
|
||||||
c := api.DefaultConfig()
|
c := api.DefaultConfig()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user