cloudfront

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SvcStateOpen         = "open"
	SvcStateAccessDenied = "access denied"
	SvcStateClosed       = "closed"
	SvcStateFiltered     = "filtered"
	SvcStateUnknown      = "unknown"
	SvcStateProxyError   = "proxy error"
)

Variables

This section is empty.

Functions

func GetProxy

func GetProxy(ctx context.Context, profile, region string) (*types.DistributionSummary, error)

GetProxy returns the CloudFront distribution created by cdn-proxy otherwise nil if none are found. CloudFront distributions created by cdn-proxy are identified by a Tag key of "cdn-proxy-target".

Types

type CloudFrontScanner

type CloudFrontScanner struct {
	ProxyDomain string
	Client      *http.Client
	Pool        *pond.WorkerPool
}

func NewScanner

func NewScanner(proxyDomain string, maxWorkers, maxCapacity int) *CloudFrontScanner

func (*CloudFrontScanner) Submit

func (c *CloudFrontScanner) Submit(req *http.Request)

type Response

type Response struct {
	ProxyResp  *http.Response
	ProxyErr   error
	DirectResp *http.Response
	DirectErr  error
}

type SvcState

type SvcState string

func (SvcState) IsBlocked

func (s SvcState) IsBlocked() bool

Jump to

Keyboard shortcuts

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