cdn

package
v0.0.0-...-70e7a0d Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSignatureHeader = errors.New("signature header not found in CDN response")
	ErrInvalidSignature       = errors.New("invalid config signature, potential tampering detected")
)

Functions

func NewClient

func NewClient(endpoint string, token string, opts *Options) (routerconfig.Client, error)

NewClient creates a new CDN client. URL is the URL of the CDN. Token is the token used to authenticate with the CDN, the same as the GRAPH_API_TOKEN

Types

type Client

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

func (*Client) RouterConfig

func (cdn *Client) RouterConfig(ctx context.Context, version string, modifiedSince time.Time) (*routerconfig.Response, error)

type Options

type Options struct {
	Logger       *zap.Logger
	SignatureKey string
}

Jump to

Keyboard shortcuts

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