add token and addr to http flags

This commit is contained in:
Frank Schroeder 2017-10-17 10:24:49 +02:00 committed by Frank Schröder
parent 6998d82be5
commit 3f7cfca203
1 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,10 @@ func (f *HTTPFlags) ServerFlags() *flag.FlagSet {
return fs
}
func (f *HTTPFlags) Addr() string {
return f.address.String()
}
func (f *HTTPFlags) Datacenter() string {
return f.datacenter.String()
}
@ -76,6 +80,10 @@ func (f *HTTPFlags) Stale() bool {
return *f.stale.v
}
func (f *HTTPFlags) Token() string {
return f.token.String()
}
func (f *HTTPFlags) APIClient() (*api.Client, error) {
c := api.DefaultConfig()