Documentation ¶
Index ¶
- type Retryer
- type S3Storage
- func (st *S3Storage) DeleteObject(obj *storage.Object) error
- func (st *S3Storage) GetObjectACL(obj *storage.Object) error
- func (st *S3Storage) GetObjectContent(obj *storage.Object) error
- func (st *S3Storage) GetObjectMeta(obj *storage.Object) error
- func (st *S3Storage) List(output chan<- *storage.Object) error
- func (st *S3Storage) PutObject(obj *storage.Object) error
- func (st *S3Storage) WithContext(ctx context.Context)
- func (st *S3Storage) WithRateLimit(limit int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Retryer ¶
type Retryer struct { // RetryCnt is the number of max retries that will be performed. // By default, this is zero. RetryCnt uint // RetryDelay is the minimum retry delay after which retry will be performed. // If not set, the value is 0ns. RetryDelay time.Duration }
Retryer implements basic retry logic You can implement the request.Retryer interface.
func (Retryer) MaxRetries ¶
MaxRetries returns the number of maximum returns the service will use to make an individual API request.
func (Retryer) RetryRules ¶
RetryRules returns the delay duration before retrying this request again
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage configuration.
func NewS3Storage ¶
func NewS3Storage(awsNoSign bool, awsAccessKey, awsSecretKey, awsToken, awsRegion, endpoint, bucketName, prefix string, keysPerReq int64, retryCnt uint, retryDelay time.Duration, skipSSLVerify bool, serverGzip bool) *S3Storage
NewS3Storage return new configured S3 storage.
You should always create new storage with this constructor.
func (*S3Storage) DeleteObject ¶
DeleteObject remove object from S3.
func (*S3Storage) GetObjectACL ¶
GetObjectACL read object ACL from S3.
func (*S3Storage) GetObjectContent ¶
GetObjectContent read object content and metadata from S3.
func (*S3Storage) GetObjectMeta ¶
GetObjectMeta update object metadata from S3.
func (*S3Storage) PutObject ¶
PutObject saves object to S3. PutObject ignore VersionId, it always save object as latest version.
func (*S3Storage) WithContext ¶
WithContext add's context to storage.
func (*S3Storage) WithRateLimit ¶
WithRateLimit set rate limit (bytes/sec) for storage.