Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // domain of s3 compatible api S3Host = "s3.amazonaws.com" GSHost = "storage.googleapis.com" )
Functions ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader will read in streamed bytes from the s3 object.NewS3Client
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer will write to local buffer first and will copy all the written contents to the S3 destination after calling Close(). Close() must be called in order for the written contents to be written to S3.
Calling Abort() before Close() will cleanup the buffer. Calling Close() after Abort() will not result in any writing to S3.
Calling Abort() after Close() will do nothing.
func (*Writer) Abort ¶
Abort will: - clear and close buffer
Calling Close after Abort will do nothing. Writing after calling Abort has undefined behavior.
func (*Writer) Close ¶
Close will: - calculate final checksum - copy (mv) buffer to pth file - clear and close buffer - report any errors
If an error is returned it should be assumed that S3 object writing failed.
Calling Abort after Close will do nothing. Writing after calling Close has undefined behavior.