Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxParallels is the default value of the maximum number of concurrent executions of the transfer process to S3. DefaultMaxParallels = 1 // RetryWait is the interval for retrying the transfer process to S3. RetryWait = time.Second // TestObjectKey is the key of the test object. TestObjectKey = ".s3mover-test-object" // DefaultTimeFormat is the default time format for the key of the object in S3. DefaultTimeFormat = "2006/01/02/15" )
View Source
const DefaultGzipLevel = 6
Variables ¶
View Source
var (
TZ *time.Location
)
Functions ¶
Types ¶
type Config ¶
type Metrics ¶
type Metrics struct { Objects struct { Uploaded int64 `json:"uploaded"` Errored int64 `json:"errored"` Queued int64 `json:"queued"` } `json:"objects"` }
func NewMetrics ¶
func NewMetrics() *Metrics
type S3Client ¶
type S3Client interface {
PutObject(ctx context.Context, input *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}
S3Client is an interface for the S3 client.
type Transporter ¶
type Transporter struct {
// contains filtered or unexported fields
}
Transporter represents a file transfer process to S3.
func New ¶
func New(ctx context.Context, config *Config) (*Transporter, error)
New creates a new Transporter.
func (*Transporter) Metrics ¶
func (tr *Transporter) Metrics() *Metrics
Click to show internal directories.
Click to hide internal directories.