Versions in this module Expand all Collapse all v1 v1.12.2 Nov 8, 2023 Changes in this version + var Error = errs.Class("eestream/improved") + type Batch struct + func (b *Batch) Claim() bool + func (b *Batch) Release() + func (b *Batch) Slice() []byte + type BatchPool struct + func NewBatchPool(shareSize int) *BatchPool + func (b *BatchPool) GetAndClaim() *Batch + func (b *BatchPool) Size() int + type ErasureScheme interface + Decode func(out []byte, in []infectious.Share) ([]byte, error) + Encode func(in []byte, out func(num int, data []byte)) error + EncodeSingle func(in, out []byte, num int) error + ErasureShareSize func() int + Rebuild func(in []infectious.Share, out func(infectious.Share)) error + RequiredCount func() int + StripeSize func() int + TotalCount func() int + type PiecesProgress struct + func NewPiecesProgress(minimum, total int32) *PiecesProgress + func (y *PiecesProgress) AcknowledgeNewStripes() + func (y *PiecesProgress) IncreaseNeededShares() bool + func (y *PiecesProgress) NeededShares() int32 + func (y *PiecesProgress) PieceSharesReceived(idx int) int32 + func (y *PiecesProgress) SetStripesNeeded(required int32) + func (y *PiecesProgress) SharesCompleted(idx int, delta int32) bool + type StreamingPiece struct + func NewStreamingPiece(shareSize int, totalSize int64, pool *BatchPool) *StreamingPiece + func (b *StreamingPiece) Err() error + func (b *StreamingPiece) MarkCompleted(sharesCompleted int) + func (b *StreamingPiece) ReadShare(shareIdx int) (data []byte, release func(), err error) + func (b *StreamingPiece) ReadSharesFrom(r io.Reader) (shareCount int, done bool) + type StripeReader struct + func New(readers map[int]io.ReadCloser, scheme ErasureScheme, totalStripes int, ...) *StripeReader + func (s *StripeReader) Close() error + func (s *StripeReader) CloseAndWait() error + func (s *StripeReader) ReadStripes(ctx context.Context, nextStripe int64, out []byte) (_ []byte, count int, err error)