Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptedMetadata ¶
type EncryptedMetadata interface { // EncryptedMetadata creates stream metadata, including the size of the // final segment. The stream metadata is encrypted and returned. Also // returned is an encrypted version of the key used to encrypt the metadata // as well as the nonce used to encrypt the key. EncryptedMetadata(lastSegmentSize int64) (data []byte, encKey *storj.EncryptedPrivateKey, nonce *storj.Nonce, err error) }
EncryptedMetadata is used to encrypt the metadata from the object.
type Info ¶
type Info = streambatcher.Info
Info is the information about the stream upload.
func UploadObject ¶
func UploadObject(ctx context.Context, segmentSource SegmentSource, segmentUploader SegmentUploader, miBatcher metaclient.Batcher, beginObject *metaclient.BeginObjectParams, encMeta EncryptedMetadata) (_ Info, err error)
UploadObject uploads a stream of segments as an object identified by the given beginObject response.
func UploadPart ¶
func UploadPart(ctx context.Context, segmentSource SegmentSource, segmentUploader SegmentUploader, miBatcher metaclient.Batcher, streamID storj.StreamID, eTagCh <-chan []byte) (_ Info, err error)
UploadPart uploads a stream of segments as a part of a multipart upload identified by the given streamID.
type SegmentSource ¶
type SegmentSource interface { // Next returns the next segment. It will return all-nil when there are no // more segments left. Next(context.Context) (splitter.Segment, error) }
SegmentSource is a source of segments to be uploaded.
type SegmentUpload ¶
type SegmentUpload interface { // Wait waits until the segment is uploaded and returns the request needed // to commit the segment to the metainfo store. Wait() (*metaclient.CommitSegmentParams, error) }
SegmentUpload is an upload for a single remote segment of the stream.
type SegmentUploader ¶
type SegmentUploader interface { // Begin starts an Upload for a single remote segment of the stream. // Callers can wait for the upload to finish using the Wait() method. Begin(ctx context.Context, resp *metaclient.BeginSegmentResponse, segment splitter.Segment) (SegmentUpload, error) }
SegmentUploader uploads a single remote segment of the stream.
Click to show internal directories.
Click to hide internal directories.