selector: use custom domain (#1760)

* util/wrapper: improve auth errors

* client: add network call option

* client/selector: add domain select option

* client/grpc: pass network option to selector
This commit is contained in:
ben-toogood
2020-06-30 10:07:52 +01:00
committed by GitHub
parent deea8fecf4
commit 0f5c53b6e4
5 changed files with 42 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ type Options struct {
type SelectOptions struct {
Filters []Filter
Strategy Strategy
Domain string
// Other options for implementations of the interface
// can be stored in a context
@@ -68,3 +69,10 @@ func WithStrategy(fn Strategy) SelectOption {
o.Strategy = fn
}
}
// WithDomain sets the registry domain to use for the selection
func WithDomain(d string) SelectOption {
return func(o *SelectOptions) {
o.Domain = d
}
}