Skip to content

Commit e57a7a0

Browse files
committed
wip working
1 parent bd5d598 commit e57a7a0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

api/api.go

+8
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ type QueryOptions struct {
8787
// Currently only supported by specific endpoints.
8888
Reverse bool
8989

90+
// Choose is used when selecting a subset of services from the normal
91+
// complete list of services. Format is <count>|<hash>, where the hash is
92+
// typically the allocation ID of the requesting task.
93+
Choose string
94+
9095
// ctx is an optional context pass through to the underlying HTTP
9196
// request layer. Use Context() and WithContext() to manage this.
9297
ctx context.Context
@@ -611,6 +616,9 @@ func (r *request) setQueryOptions(q *QueryOptions) {
611616
if q.Filter != "" {
612617
r.params.Set("filter", q.Filter)
613618
}
619+
if q.Choose != "" {
620+
r.params.Set("choose", q.Choose)
621+
}
614622
if q.PerPage != 0 {
615623
r.params.Set("per_page", fmt.Sprint(q.PerPage))
616624
}

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ module github.com/hashicorp/nomad
22

33
go 1.17
44

5+
// remove
6+
replace github.com/hashicorp/consul-template => ../consul-template
7+
58
// Pinned dependencies are noted in github.com/hashicorp/nomad/issues/11826
69
replace (
710
github.com/Microsoft/go-winio => github.com/endocrimes/go-winio v0.4.13-0.20190628114223-fb47a8b41948

0 commit comments

Comments
 (0)