Example #1
0
 public NotFoundBucket(ICakeLog logger, IBucketOperations minio, string bucketName, string region)
 {
     this.logger     = logger;
     this.minio      = minio;
     this.bucketName = bucketName;
     this.region     = region;
 }
Example #2
0
 public BucketOperator(
     ICakeLog logger,
     IBucketOperations minio,
     MinioBucketSettings settings)
     : this(logger, minio, settings.BucketName, settings.Region)
 {
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
 }
Example #3
0
        public MinioS3Client(IBucketOperations bucketOperationsClient, IObjectOperations objectOperationsClient, string endpoint, string bucketName, ILogger <IS3Client> logger, int retryCount, int retryInSeconds)
        {
            if (retryCount < 0 || retryInSeconds < 0)
            {
                throw new S3BaseException("Retry count and retry in seconds parameters should be > 0");
            }

            _endpoint = endpoint;
            _objectOperationsClient = objectOperationsClient;
            _bucketOperationsClient = bucketOperationsClient;
            _bucketName             = bucketName.ToLower();
            _logger         = logger;
            _retryCount     = retryCount;
            _retryInSeconds = retryInSeconds;

            _requestRetryPolicy = Policy.Handle <ConnectionException>().Or <InternalServerException>().Or <InternalClientException>()
                                  .WaitAndRetryAsync(_retryCount, retryAttempt => TimeSpan.FromSeconds(_retryInSeconds), (ex, time, retryAttempt, ctx) =>
            {
                var message = $"Problem connecting to S3 endpoint. Retrying {retryAttempt}/{_retryCount}. Endpoint={_endpoint}";
                _logger?.LogWarning(ex, message);
                Debug.WriteLine(message);
            });
        }
Example #4
0
 public S3BucketClient(IBucketOperations bucketOperations)
 {
     BucketOperations = bucketOperations;
 }
Example #5
0
 public S3BucketClient(IBucketOperations bucketOperations, IS3ObjectClient objectClient)
 {
     _bucketOperations = bucketOperations;
     _objectClient     = objectClient;
 }
Example #6
0
 public BucketClient(IBucketOperations bucketOperations)
 {
     _bucketOperations = bucketOperations;
 }
Example #7
0
 public BucketOperator(
     ICakeLog logger,
     IBucketOperations minio)
     : this(logger, minio, new MinioBucketSettings())
 {
 }
Example #8
0
 public FoundBucket(ICakeLog logger, IBucketOperations minio, string bucketName)
 {
     this.logger     = logger;
     this.minio      = minio;
     this.bucketName = bucketName;
 }
Example #9
0
 public PooledBucketClient(IBucketOperations bucketOperations)
 {
     BucketOperations = bucketOperations;
 }