Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultSizeLimit = "5TB" DefaultPartSize = "500GB" DefaultChunkSize = "250MB" DefaultBufferSize = "32MB" DefaultReportPeriod = time.Second DefaultConcurrentJobs = 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeleteOption ¶
type DeleteOption func(*DeleteOptions)
func WithConcurrentDeleteJobs ¶
func WithConcurrentDeleteJobs(concurrentJobs int) DeleteOption
type DeleteOptions ¶
type DeleteOptions struct {
ConcurrentJobs int
}
type Exporter ¶
type Exporter interface {
Provider() Provider
Upload(dir, bucket, name string, opts ...UploadOption) error
Delete(bucket, name string, opts ...DeleteOption) error
}
func FromProvider ¶
type GcsExporter ¶
type GcsExporter struct {
// contains filtered or unexported fields
}
func NewGcsExporter ¶
func NewGcsExporter() (*GcsExporter, error)
func (*GcsExporter) Delete ¶
func (gcs *GcsExporter) Delete(bucket, name string, opts ...DeleteOption) error
func (*GcsExporter) Provider ¶
func (gcs *GcsExporter) Provider() Provider
func (*GcsExporter) Upload ¶
func (gcs *GcsExporter) Upload(dir, bucket, name string, opts ...UploadOption) error
type UploadOption ¶
type UploadOption func(*UploadOptions)
func WithBufferSize ¶
func WithBufferSize(size string) UploadOption
func WithChunkSize ¶
func WithChunkSize(size string) UploadOption
func WithConcurrentUploadJobs ¶
func WithConcurrentUploadJobs(concurrentJobs int) UploadOption
func WithPartSize ¶
func WithPartSize(size string) UploadOption
func WithReportPeriod ¶
func WithReportPeriod(period time.Duration) UploadOption
func WithSizeLimit ¶
func WithSizeLimit(size string) UploadOption
Click to show internal directories.
Click to hide internal directories.