code: func NewCachePurgeClient(
  	endpoint,
  	clientToken,
  	clientSecret,
  	accessToken string,
  	v3Network string,
  	retries int,
  	retryBackoff time.Duration,
  	log blog.Logger,
  	stats metrics.Scope,
  ) (*CachePurgeClient, error) {
  	stats = stats.NewScope("CCU")
  	if strings.HasSuffix(endpoint, "/") {
  		endpoint = endpoint[:len(endpoint)-1]
  	}
  	apiURL, err := url.Parse(endpoint)
  	if err != nil {
  		return nil, err
  	}
  	// The network string must be either "production" or "staging".
  	if v3Network != "production" && v3Network != "staging" {
  		return nil, fmt.Errorf(
  			"Invalid CCU v3 network: %q. Must be \"staging\" or \"production\"", v3Network)
  	}
  	return &CachePurgeClient{
  		client:       new(http.Client),
  		apiEndpoint:  endpoint,
  		apiHost:      apiURL.Host,
  		apiScheme:    strings.ToLower(apiURL.Scheme),
  		clientToken:  clientToken,
  		clientSecret: clientSecret,
  		accessToken:  accessToken,
  		v3Network:    v3Network,
  		retries:      retries,
  		retryBackoff: retryBackoff,
  		log:          log,
  		stats:        stats,
  		clk:          clock.Default(),
  	}, nil
  }
docs: // NewCachePurgeClient constructs a new CachePurgeClient