statics

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindBucket

func FindBucket(ctx context.Context, app *fly.App, org *fly.Organization) (*gql.ListAddOnsAddOnsAddOnConnectionNodesAddOn, error)

FindBucket finds the tigris statics bucket for the given app and org. Returns nil, nil if no bucket is found.

func MoveBucket

func MoveBucket(
	ctx context.Context,
	prevBucket *gql.ListAddOnsAddOnsAddOnConnectionNodesAddOn,
	prevOrg *fly.Organization,
	app *fly.App,
	targetOrg *fly.Organization,
	machines []*fly.Machine,
) error

MoveBucket moves the statics bucket from one org to another. Or, more precisely, it creates a new bucket in the new org and copies all the files from the old bucket to the new bucket - then deletes the old bucket.

func StaticIsCandidateForTigrisPush

func StaticIsCandidateForTigrisPush(static appconfig.Static) bool

Types

type DeployerState

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

func Deployer

func Deployer(appConfig *appconfig.Config, app *fly.App, org *fly.Organization, releaseVersion int) *DeployerState

func (*DeployerState) CleanupAfterFailure

func (deployer *DeployerState) CleanupAfterFailure(_ context.Context)

CleanupAfterFailure removes the incomplete push and restores the app to its original state.

func (*DeployerState) Configure

func (deployer *DeployerState) Configure(ctx context.Context) error

Configure create the tigris bucket if not created, and sets up internal state on the deployer.

func (*DeployerState) Finalize

func (deployer *DeployerState) Finalize(ctx context.Context) error

Finalize deletes old statics from the tigris bucket.

func (*DeployerState) Push

func (deployer *DeployerState) Push(ctx context.Context) (err error)

Push statics to the tigris bucket.

Jump to

Keyboard shortcuts

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