cdn

package
v0.0.0-...-6252ba2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PersistedOperationNotFoundErrorCode = "PersistedQueryNotFound"
)

Variables

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

Functions

This section is empty.

Types

type PersistentOperationClient

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

func NewPersistentOperationClient

func NewPersistentOperationClient(endpoint string, token string, opts PersistentOperationsOptions) (*PersistentOperationClient, error)

NewPersistentOperationClient 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

func (*PersistentOperationClient) PersistedOperation

func (cdn *PersistentOperationClient) PersistedOperation(ctx context.Context, clientName string, sha256Hash []byte) ([]byte, error)

type PersistentOperationNotFoundError

type PersistentOperationNotFoundError interface {
	error
	ClientName() string
	Sha256Hash() string
}

type PersistentOperationsOptions

type PersistentOperationsOptions struct {
	// CacheSize indicates the in-memory cache size, in bytes. If 0, no in-memory
	// cache is used.
	CacheSize uint64
	Logger    *zap.Logger
}

type RouterConfigClient

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

func NewRouterConfigClient

func NewRouterConfigClient(endpoint string, token string, opts RouterConfigOptions) (*RouterConfigClient, error)

NewRouterConfigClient 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

func (*RouterConfigClient) RouterConfig

func (cdn *RouterConfigClient) RouterConfig(ctx context.Context, version string) (*nodev1.RouterConfig, error)

type RouterConfigNotFoundError

type RouterConfigNotFoundError interface {
	error
	FederatedGraphId() string
}

type RouterConfigOptions

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

Jump to

Keyboard shortcuts

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