Documentation
¶
Index ¶
- type ClientConfig
- type RetryConfig
- type S3Client
- func (c *S3Client) AbortMultipartUpload(ctx context.Context, input *s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
- func (c *S3Client) GetBucketLocation(ctx context.Context, bucket string) (*s3.GetBucketLocationOutput, error)
- func (c *S3Client) GetClient() *s3.Client
- func (c *S3Client) GetRetryConfig() RetryConfig
- func (c *S3Client) HeadBucket(ctx context.Context, bucket string) (*s3.HeadBucketOutput, error)
- func (c *S3Client) ListBuckets(ctx context.Context) (*s3.ListBucketsOutput, error)
- func (c *S3Client) ListMultipartUploads(ctx context.Context, input *s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
- func (c *S3Client) ListParts(ctx context.Context, input *s3.ListPartsInput) (*s3.ListPartsOutput, error)
- func (c *S3Client) UpdateRateLimit(limit rate.Limit)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Profile string
Region string
RetryConfig RetryConfig
RateLimit rate.Limit // requests per second
}
ClientConfig contains configuration for creating an S3Client
type RetryConfig ¶
type RetryConfig struct {
MaxRetries int `json:"max_retries"`
BaseDelay time.Duration `json:"base_delay"`
MaxDelay time.Duration `json:"max_delay"`
BackoffFactor float64 `json:"backoff_factor"`
}
RetryConfig defines retry behavior configuration
func DefaultRetryConfig ¶
func DefaultRetryConfig() RetryConfig
DefaultRetryConfig returns the default retry configuration
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
S3Client wraps the AWS S3 client with retry logic and rate limiting
func NewS3Client ¶
func NewS3Client(ctx context.Context, cfg ClientConfig) (*S3Client, error)
NewS3Client creates a new S3Client with retry logic and rate limiting
func (*S3Client) AbortMultipartUpload ¶
func (c *S3Client) AbortMultipartUpload(ctx context.Context, input *s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
AbortMultipartUpload aborts a multipart upload with retry logic
func (*S3Client) GetBucketLocation ¶
func (c *S3Client) GetBucketLocation(ctx context.Context, bucket string) (*s3.GetBucketLocationOutput, error)
GetBucketLocation gets the region of a specific bucket with retry logic
func (*S3Client) GetRetryConfig ¶
func (c *S3Client) GetRetryConfig() RetryConfig
GetRetryConfig returns the current retry configuration
func (*S3Client) HeadBucket ¶
HeadBucket checks if a bucket exists and is accessible with retry logic
func (*S3Client) ListBuckets ¶
ListBuckets lists all S3 buckets with retry logic
func (*S3Client) ListMultipartUploads ¶
func (c *S3Client) ListMultipartUploads(ctx context.Context, input *s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
ListMultipartUploads lists incomplete multipart uploads for a bucket with retry logic
func (*S3Client) ListParts ¶
func (c *S3Client) ListParts(ctx context.Context, input *s3.ListPartsInput) (*s3.ListPartsOutput, error)
ListParts lists parts of a multipart upload with retry logic
func (*S3Client) UpdateRateLimit ¶
UpdateRateLimit updates the rate limiter with a new limit