uploader

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package uploader implements Amazon Glacier multipart upload.

For information about Glacier, see https://aws.amazon.com/glacier/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	// The AccountId value is the AWS account ID of the account that owns the vault.
	// You can either specify an AWS account ID or optionally a single '-' (hyphen),
	// in which case Amazon Glacier uses the AWS account ID associated with the
	// credentials used to sign the request. If you use an account ID, do not include
	// any hyphens ('-') in the ID.
	AccountId string

	// The name of the vault.
	VaultName string

	// The file to upload.
	FileName string

	// The upload ID of the multipart upload.
	// If the value is empty then a new upload will be initiated.
	// Specify the upload ID to resume an interrupted upload.
	UploadId string

	// The size of each part except the last, in bytes. The last part can be smaller
	// than this part size.
	PartSize int64
}

Input provides options for multipart upload to an Amazon Glacier vault.

type Uploader

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

Uploader holds internal uploader state.

func New

func New(service glacieriface.GlacierAPI, input *Input) *Uploader

New creates a new instance of the uploader with a service and input.

func (Uploader) Upload

func (s Uploader) Upload(jobs int) error

Upload performs parallel multipart upload. The maximum number of the parallel uploads is limited by the jobs parameter.

Jump to

Keyboard shortcuts

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