Skip to content

Commit

Permalink
current node in request option (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
realityone authored Sep 4, 2023
1 parent 39a2e09 commit 084b012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (c *client) RoundTrip(req *http.Request) (resp *http.Response, err error) {
if err != nil {
return nil, err
}
reqOpt.CurrentNode = n

addr := n.Address()
reqOpt.Backends = append(reqOpt.Backends, addr)
Expand Down
1 change: 1 addition & 0 deletions middleware/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type RequestOptions struct {
Metadata map[string]string
UpstreamStatusCode []int
UpstreamResponseTime []float64
CurrentNode selector.Node
DoneFunc selector.DoneFunc
LastAttempt bool
Values RequestValues
Expand Down

0 comments on commit 084b012

Please sign in to comment.