Merge commit '3b735dd9330e0989f51a76771c3303031154154e' into 21158-wf-page-list
[arvados.git] / services / keepproxy / proxy_client.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package keepproxy
6
7 import (
8         "net/http"
9
10         "git.arvados.org/arvados.git/sdk/go/keepclient"
11 )
12
13 var viaAlias = "keepproxy"
14
15 type proxyClient struct {
16         client keepclient.HTTPClient
17         proto  string
18 }
19
20 func (pc *proxyClient) Do(req *http.Request) (*http.Response, error) {
21         req.Header.Add("Via", pc.proto+" "+viaAlias)
22         return pc.client.Do(req)
23 }