Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GoogleCloudStorage = &gcsProvider{}
GoogleCloudStorage is the provider for Google Cloud Storage (GCS).
View Source
var S3Storage = &s3Provider{}
S3Storage is the provider for Amazon S3.
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 Provider ¶
type Provider interface { // Scheme returns the URI scheme we handle. Scheme() string // OpenFilestore opens a handle to the specified filestore. OpenFilestore(ctx context.Context, filestore *api.Filestore, useServiceAccount, confirm bool) (syncFilestore, error) }
Provider defines a file provider, able to work with GCS or S3.
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 ¶
SyncFileOp defines a synchronization operation.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.