invalidator

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package invalidator contains tools for invalidating a CloudFront distribution

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invalidator

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

Invalidator is an object that can invalidate a specific CloudFront distibution or check the status of an existing invalidation.

func FromArgs

func FromArgs(args []string) *Invalidator

FromArgs creates a new Invalidator from command line arguments. Warning: Exits on error.

func New

func New(cf *cloudfront.CloudFront, callerReference, distID string, paths ...string) *Invalidator

New creates a useable new Invalidator. If cf is nil, New attempts to create an Amazon default session and panics on failure. If callerReference is "", a Unix timestamp is used.

func (*Invalidator) Done

func (inv *Invalidator) Done(id string) (done bool, err error)

Done returns a bool indicating whether the referenced invalidation has completed.

func (*Invalidator) Execute

func (inv *Invalidator) Execute() error

Execute runs the invalidator for the CLI.

func (*Invalidator) Invalidate

func (inv *Invalidator) Invalidate() (id string, err error)

Invalidate invalidates the underlying distribution. The id returned can be used with Done().

Jump to

Keyboard shortcuts

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