Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAllRetriesFailed lets the caller of Purge to know if all the purge submission // attempts failed ErrAllRetriesFailed = errors.New("All attempts to submit purge request failed") )
Functions ¶
This section is empty.
Types ¶
type CachePurgeClient ¶
type CachePurgeClient struct {
// contains filtered or unexported fields
}
CachePurgeClient talks to the Akamai CCU REST API. It is safe to make concurrent purge requests. If the v3Network field is "" the legacy CCU v2 API is used. If the v3Network field is either "staging" or "production" then the CCU v3 API is used.
func NewCachePurgeClient ¶
func NewCachePurgeClient( endpoint, clientToken, clientSecret, accessToken string, v3Network string, retries int, retryBackoff time.Duration, log blog.Logger, stats metrics.Scope, ) (*CachePurgeClient, error)
NewCachePurgeClient constructs a new CachePurgeClient
func (*CachePurgeClient) Purge ¶
func (cpc *CachePurgeClient) Purge(urls []string) error
Purge attempts to send a purge request to the Akamai CCU API cpc.retries number
of times before giving up and returning ErrAllRetriesFailed
Click to show internal directories.
Click to hide internal directories.