Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Error = errs.Class("stream")
Error is the errs class of stream errors.
Functions ¶
This section is empty.
Types ¶
type Download ¶
type Download struct {
// contains filtered or unexported fields
}
Download implements Reader, Seeker and Closer for reading from stream.
func NewDownload ¶
func NewDownload(ctx context.Context, info metaclient.DownloadInfo, streams *streams.Store) *Download
NewDownload creates new stream download.
func NewDownloadRange ¶
func NewDownloadRange(ctx context.Context, info metaclient.DownloadInfo, streams *streams.Store, start, length int64) *Download
NewDownloadRange creates new stream range download with range from start to start+length.
type PartUpload ¶ added in v1.6.0
type PartUpload struct {
// contains filtered or unexported fields
}
PartUpload implements Writer and Closer for writing to part.
func NewUploadPart ¶ added in v1.6.0
func NewUploadPart(ctx context.Context, bucket, key string, streamID storj.StreamID, partNumber uint32, etag streams.ETag, streamsStore *streams.Store) *PartUpload
NewUploadPart creates new part upload.
func (*PartUpload) Abort ¶ added in v1.6.0
func (upload *PartUpload) Abort() error
Abort closes the stream with an error so that it does not successfully commit and releases the underlying resources.
func (*PartUpload) Close ¶ added in v1.6.0
func (upload *PartUpload) Close() error
Close closes the stream and releases the underlying resources.
func (*PartUpload) Part ¶ added in v1.6.0
func (upload *PartUpload) Part() *streams.Part
Part returns the part metadata.
Will return nil if the upload is still in progress.
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
Upload implements Writer and Closer for writing to stream.
func NewUpload ¶
func NewUpload(ctx context.Context, stream *metaclient.MutableStream, streamsStore *streams.Store) *Upload
NewUpload creates new stream upload.
func (*Upload) Abort ¶ added in v1.2.0
Abort closes the stream with an error so that it does not successfully commit and releases the underlying resources.