file

package
v3.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilestorePromoter

type FilestorePromoter struct {
	Source *api.Filestore
	Dest   *api.Filestore

	Files []api.File

	// Confirm, if set, will trigger a PRODUCTION artifact promotion.
	Confirm bool

	// UseServiceAccount must be true, for service accounts to be used
	// This gives some protection against a hostile manifest.
	UseServiceAccount bool
}

FilestorePromoter manages the promotion of files.

func (*FilestorePromoter) BuildOperations

func (p *FilestorePromoter) BuildOperations(
	ctx context.Context,
) ([]SyncFileOp, error)

BuildOperations builds the required operations to sync from the Source Filestore to the Dest Filestore.

type ManifestPromoter

type ManifestPromoter struct {
	Manifest *api.Manifest

	// Confirm, if set, will trigger a PRODUCTION artifact promotion.
	Confirm bool

	// UseServiceAccount must be true, for service accounts to be used
	// This gives some protection against a hostile manifest.
	UseServiceAccount bool
}

ManifestPromoter promotes files as described in Manifest.

func (*ManifestPromoter) BuildOperations

func (p *ManifestPromoter) BuildOperations(
	ctx context.Context,
) ([]SyncFileOp, error)

BuildOperations builds the required operations to sync from the Source Filestore to all Dest Filestores in the manifest.

type SyncFileInfo

type SyncFileInfo struct {
	RelativePath string
	AbsolutePath string

	// Some backends (GCS and S3) expose the MD5 of the content in metadata
	// This can allow skipping unnecessary copies.
	// Note: with multipart uploads or compression, the value is unobvious.
	MD5 string

	Size int64
	// contains filtered or unexported fields
}

SyncFileInfo tracks a file during the synchronization operation.

type SyncFileOp

type SyncFileOp interface {
	Run(ctx context.Context) error
}

SyncFileOp defines a synchronization operation.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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