akamai

package
v0.0.0-...-30a5167 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2021 License: MPL-2.0 Imports: 20 Imported by: 53

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

func CheckSignature

func CheckSignature(secret string, url string, r *http.Request, body []byte) error

CheckSignature is used for tests, it exported so that it can be used in akamai-test-srv

func GeneratePurgeURLs

func GeneratePurgeURLs(cert, issuer *x509.Certificate) ([]string, error)

GeneratePurgeURLs generates akamai URLs that can be POSTed to in order to purge akamai's cache of the corresponding OCSP responses. The URLs encode the contents of the OCSP request, so this method constructs a full OCSP request.

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.

func NewCachePurgeClient

func NewCachePurgeClient(
	endpoint,
	clientToken,
	clientSecret,
	accessToken string,
	v3Network string,
	retries int,
	retryBackoff time.Duration,
	log blog.Logger,
	stats prometheus.Registerer,
) (*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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL