aws

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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) GetClient

func (c *S3Client) GetClient() *s3.Client

GetClient returns the underlying S3 client for advanced operations

func (*S3Client) GetRetryConfig

func (c *S3Client) GetRetryConfig() RetryConfig

GetRetryConfig returns the current retry configuration

func (*S3Client) HeadBucket

func (c *S3Client) HeadBucket(ctx context.Context, bucket string) (*s3.HeadBucketOutput, error)

HeadBucket checks if a bucket exists and is accessible with retry logic

func (*S3Client) ListBuckets

func (c *S3Client) ListBuckets(ctx context.Context) (*s3.ListBucketsOutput, error)

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

func (c *S3Client) UpdateRateLimit(limit rate.Limit)

UpdateRateLimit updates the rate limiter with a new limit

Jump to

Keyboard shortcuts

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