Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errs.Class("segment error")
Error is the errs class of standard segment errors.
Functions ¶
This section is empty.
Types ¶
type SizedReader ¶
type SizedReader struct {
// contains filtered or unexported fields
}
SizedReader allows to check the total number of bytes read so far.
func SizeReader ¶
func SizeReader(r io.Reader) *SizedReader
SizeReader create a new instance of SizedReader.
func (*SizedReader) Read ¶
func (r *SizedReader) Read(p []byte) (n int, err error)
Read implements io.Reader.Read.
func (*SizedReader) Size ¶
func (r *SizedReader) Size() int64
Size returns the total number of bytes read so far.
type Store ¶
type Store interface { // Ranger creates a ranger for downloading erasure codes from piece store nodes. Ranger(ctx context.Context, info storj.SegmentDownloadInfo, limits []*pb.AddressedOrderLimit, objectRS storj.RedundancyScheme) (ranger.Ranger, error) Put(ctx context.Context, data io.Reader, expiration time.Time, limits []*pb.AddressedOrderLimit, piecePrivateKey storj.PiecePrivateKey, rs eestream.RedundancyStrategy) (_ []*pb.SegmentPieceUploadResult, size int64, err error) }
Store for segments.
Click to show internal directories.
Click to hide internal directories.