From 888ef147fa13995db902284fecf2d81cc1f67df0 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Wed, 3 Apr 2019 19:37:12 -0700 Subject: [PATCH] Expose a way to update the transport. --- ca/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ca/client.go b/ca/client.go index dfe63a3f..8f4eb151 100644 --- a/ca/client.go +++ b/ca/client.go @@ -258,6 +258,11 @@ func NewClient(endpoint string, opts ...ClientOption) (*Client, error) { }, nil } +// SetTransport updates the transport of the internal HTTP client. +func (c *Client) SetTransport(tr http.RoundTripper) { + c.client.Transport = tr +} + // Health performs the health request to the CA and returns the // api.HealthResponse struct. func (c *Client) Health() (*api.HealthResponse, error) {