Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a804d440
Commit
a804d440
authored
Aug 23, 2017
by
Antoine Pelisse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client-go cache: Make caching layer Unwrappable
parent
e58da7bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
round_trippers.go
staging/src/k8s.io/client-go/transport/round_trippers.go
+17
-7
No files found.
staging/src/k8s.io/client-go/transport/round_trippers.go
View file @
a804d440
...
...
@@ -86,12 +86,8 @@ type requestCanceler interface {
CancelRequest
(
*
http
.
Request
)
}
type
authProxyRoundTripper
struct
{
username
string
groups
[]
string
extra
map
[
string
][]
string
rt
http
.
RoundTripper
type
cacheRoundTripper
struct
{
rt
*
httpcache
.
Transport
}
// NewCacheRoundTripper creates a roundtripper that reads the ETag on
...
...
@@ -105,7 +101,21 @@ func NewCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripp
t
:=
httpcache
.
NewTransport
(
diskcache
.
NewWithDiskv
(
d
))
t
.
Transport
=
rt
return
t
return
&
cacheRoundTripper
{
rt
:
t
}
}
func
(
rt
*
cacheRoundTripper
)
RoundTrip
(
req
*
http
.
Request
)
(
*
http
.
Response
,
error
)
{
return
rt
.
rt
.
RoundTrip
(
req
)
}
func
(
rt
*
cacheRoundTripper
)
WrappedRoundTripper
()
http
.
RoundTripper
{
return
rt
.
rt
.
Transport
}
type
authProxyRoundTripper
struct
{
username
string
groups
[]
string
extra
map
[
string
][]
string
rt
http
.
RoundTripper
}
// NewAuthProxyRoundTripper provides a roundtripper which will add auth proxy fields to requests for
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment