Documentation ¶
Index ¶
Constants ¶
const MaxJitter = 1.0
MaxJitter will randomize over the full exponential backoff time
const NoJitter = 0.0
NoJitter disables the use of jitter for randomizing the exponential backoff time
Variables ¶
var MaxRetry = 5
MaxRetry is the maximum number of retries before stopping.
var TCPretry = []string{"i/o timeout", "net/http: TLS handshake timeout", "connection reset by peer", "read: operation timed out"}
TCPretry holds all the errors that can and should be retried.
Functions ¶
func ErrInvalidArgument ¶
ErrInvalidArgument - Invalid argument response.
Types ¶
type APItest ¶
type APItest struct { Test func(ServerConfig, int) bool Extended bool // Extended tests will only be invoked at the users request. Critical bool // Tests marked critical must pass before more tests can be run. }
APItest - Define all mainXXX tests to be of this form.
type BucketInfo ¶
type BucketInfo struct { // The name of the bucket. Name string `json:"name"` // Date the bucket was created. CreationDate time.Time `json:"creationDate"` }
BucketInfo container for bucket metadata.
type ErrorResponse ¶
type ErrorResponse struct { XMLName xml.Name `xml:"Error" json:"-"` Code string Message string BucketName string Key string RequestID string `xml:"RequestId"` HostID string `xml:"HostId"` // Region where the bucket is located. This header is returned // only in HEAD bucket and ListObjects response. Region string }
ErrorResponse - Is the typed error returned by all API operations.
func ToErrorResponse ¶
func ToErrorResponse(err error) ErrorResponse
ToErrorResponse - Returns parsed ErrorResponse struct from body and http headers.
For example:
import s3 "github.com/minio/minio-go" ... ... reader, stat, err := s3.GetObject(...) if err != nil { resp := s3.ToErrorResponse(err) } ...
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
Error - Returns HTTP error string
type ObjectInfo ¶
type ObjectInfo struct { // An ETag is optionally set to md5sum of an object. In case of multipart objects, // ETag is of the form MD5SUM-N where MD5SUM is md5sum of all individual md5sums of // each parts concatenated into one string. ETag string `json:"etag"` Key string `json:"name"` // Name of the object LastModified time.Time `json:"lastModified"` // Date and time the object was last modified. Size int64 `json:"size"` // Size in bytes of the object. ContentType string `json:"contentType"` // A standard MIME type describing the format of the object data. // Owner name. Owner struct { DisplayName string `json:"name"` ID string `json:"id"` } `json:"owner"` // The class of storage used to store the object. StorageClass string `json:"storageClass"` // Error Err error `json:"-"` Body []byte // Data held by the object. UploadID string // To be set only for multipart uploaded objects. }
ObjectInfo container for object metadata.
type ObjectInfos ¶
type ObjectInfos []ObjectInfo
ObjectInfos - A container for ObjectInfo structs to allow sorting.
func (ObjectInfos) Less ¶
func (o ObjectInfos) Less(i, j int) bool
Allow comparisons of ObjectInfo types with their Keys.
type ObjectMultipartInfo ¶
type ObjectMultipartInfo struct { // Date and time at which the multipart upload was initiated. Initiated time.Time `type:"timestamp" timestampFormat:"iso8601"` Initiator initiator Owner owner // The type of storage to use for the object. Defaults to 'STANDARD'. StorageClass string // Key of the object for which the multipart upload was initiated. Key string // Size in bytes of the object. Size int64 // Upload ID that identifies the multipart upload. UploadID string `xml:"UploadId"` // Error Err error }
ObjectMultipartInfo - Container for a Multipart Objects information.
Source Files ¶
- abort-multipart-upload.go
- animation.go
- clean-s3verify.go
- client-s3-trace.go
- complete-multipart-upload.go
- copy-object-if-match.go
- copy-object-if-modified-since.go
- copy-object-if-none-match.go
- copy-object-if-unmodified-since.go
- copy-object.go
- data-types.go
- error-response.go
- flags.go
- get-bucket-policy.go
- get-object-if-match.go
- get-object-if-modified-since.go
- get-object-if-none-match.go
- get-object-if-unmodified-since.go
- get-object-range.go
- get-object.go
- globals.go
- head-bucket.go
- head-object-if-match.go
- head-object-if-modified-since.go
- head-object-if-none-match.go
- head-object-if-unmodified-since.go
- head-object.go
- initiate-multipart-upload.go
- list-buckets.go
- list-multipart-uploads.go
- list-objects-v1.go
- list-objects-v2.go
- list-parts.go
- main.go
- post-object.go
- post-policy.go
- prepare-s3verify.go
- presigned-get-object.go
- presigned-put-object.go
- put-bucket-policy.go
- put-bucket.go
- put-object.go
- remove-bucket.go
- remove-object.go
- requests.go
- retry.go
- s3-datatypes.go
- s3-endpoints.go
- scan-bar.go
- server-config.go
- tests.go
- upload-part.go
- utils.go