Please sign in to comment.
Add transport wrapper that blocks api calls after context close
The ContextCanceller transport wrapper blocks all API requests after the provided context is closed. Used with the leader election step down, a controller can ensure that new requests are not made after the client has stepped down.
- Loading branch information...
Showing with 97 additions and 0 deletions.
- +1 −0 staging/src/k8s.io/client-go/rest/BUILD
- +1 −0 staging/src/k8s.io/client-go/tools/leaderelection/example/BUILD
- +13 −0 staging/src/k8s.io/client-go/tools/leaderelection/example/main.go
- +29 −0 staging/src/k8s.io/client-go/transport/transport.go
- +53 −0 staging/src/k8s.io/client-go/transport/transport_test.go