etcdupload

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStartCommand

func NewStartCommand() *cobra.Command

Types

type AzureBlobUploadAPI

type AzureBlobUploadAPI interface {
	UploadFile(ctx context.Context, containerName string, blobName string, file *os.File, o *azblob.UploadFileOptions) (azblob.UploadFileResponse, error)
}

AzureBlobUploadAPI defines the Azure Blob client interface used by the uploader.

type AzureBlobUploader

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

AzureBlobUploader uploads etcd snapshots to Azure Blob Storage.

func NewAzureBlobUploader

func NewAzureBlobUploader(ctx context.Context, container, storageAccount, credentialsFile, encryptionScope, authType string) (*AzureBlobUploader, error)

NewAzureBlobUploader creates a new AzureBlobUploader. authType controls how credentials are loaded:

  • "client-secret": reads a JSON file with clientId/clientSecret/tenantId (default)
  • "managed-identity": uses msi-dataplane with a certificate file from CSI mount (ARO HCP)

If credentialsFile is empty, falls back to DefaultAzureCredential regardless of authType.

func (*AzureBlobUploader) Upload

func (u *AzureBlobUploader) Upload(ctx context.Context, snapshotPath string, key string) (*UploadResult, error)

Upload uploads a snapshot file to Azure Blob Storage with conditional write and optional CMK encryption.

type S3TransferAPI

type S3TransferAPI interface {
	UploadObject(ctx context.Context, input *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.UploadObjectOutput, error)
}

S3TransferAPI defines the transfer manager interface used by the uploader.

type S3Uploader

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

S3Uploader uploads etcd snapshots to AWS S3 using the transfer manager.

func NewS3Uploader

func NewS3Uploader(ctx context.Context, bucket, region, credentialsFile, kmsKeyARN string) (*S3Uploader, error)

NewS3Uploader creates a new S3Uploader. If credentialsFile is empty, it falls back to the default AWS credential chain (environment variables, shared config, EC2 instance profile, IRSA, etc.).

func (*S3Uploader) Upload

func (u *S3Uploader) Upload(ctx context.Context, snapshotPath string, key string) (*UploadResult, error)

Upload uploads a snapshot file to S3 with optional SSE-KMS encryption. Uses the transfer manager for automatic multipart upload of large files.

type UploadResult

type UploadResult struct {
	// URL is the cloud storage URL of the uploaded snapshot.
	URL string
}

UploadResult contains the result of an upload operation.

type Uploader

type Uploader interface {
	Upload(ctx context.Context, snapshotPath string, key string) (*UploadResult, error)
}

Uploader uploads an etcd snapshot to cloud storage.

Jump to

Keyboard shortcuts

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