cdn

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cdn implements clients for CDN operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastlyClient

type FastlyClient struct {
	// contains filtered or unexported fields
}

FastlyClient implements Purger for Fastly.

func NewFastlyClient

func NewFastlyClient(token, baseURL string) *FastlyClient

NewFastlyClient creates a new FastlyClient.

func (*FastlyClient) Purge

func (c *FastlyClient) Purge(ctx context.Context, path string) error

Purge purges the given URL from Fastly. It sends a PURGE request to the given URL with the Fastly-Key header.

type NoOpClient

type NoOpClient struct{}

NoOpClient is a no-op implementation of PurgeClient.

func NewNoOpClient

func NewNoOpClient() *NoOpClient

NewNoOpClient creates a new NoOpClient.

func (*NoOpClient) Purge

func (c *NoOpClient) Purge(ctx context.Context, url string) error

Purge does nothing.

type Purger

type Purger interface {
	Purge(ctx context.Context, url string) error
}

Purger is the interface for purging URLs from a CDN.

Jump to

Keyboard shortcuts

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