Documentation ¶
Index ¶
- type ActualChunkIndex
- type ChunkWrittenInterval
- type ChunkWrittenIntervalList
- type DirtyPages
- type LogicChunkIndex
- type MemChunk
- func (mc *MemChunk) FreeResource()
- func (mc *MemChunk) IsComplete() bool
- func (mc *MemChunk) ReadDataAt(p []byte, off int64) (maxStop int64)
- func (mc *MemChunk) SaveContent(saveFn SaveToStorageFunc)
- func (mc *MemChunk) WriteDataAt(src []byte, offset int64) (n int)
- func (mc *MemChunk) WrittenSize() int64
- type PageChunk
- type SaveToStorageFunc
- type SealedChunk
- type SwapFile
- type SwapFileChunk
- func (sc *SwapFileChunk) FreeResource()
- func (sc *SwapFileChunk) IsComplete() bool
- func (sc *SwapFileChunk) ReadDataAt(p []byte, off int64) (maxStop int64)
- func (sc *SwapFileChunk) SaveContent(saveFn SaveToStorageFunc)
- func (sc *SwapFileChunk) WriteDataAt(src []byte, offset int64) (n int)
- func (sc *SwapFileChunk) WrittenSize() int64
- type UploadPipeline
- func (up *UploadPipeline) FlushAll()
- func (up *UploadPipeline) IsLocked(logicChunkIndex LogicChunkIndex) bool
- func (up *UploadPipeline) LockForRead(startOffset, stopOffset int64)
- func (up *UploadPipeline) MaybeReadDataAt(p []byte, off int64) (maxStop int64)
- func (up *UploadPipeline) SaveDataAt(p []byte, off int64, isSequential bool) (n int)
- func (up *UploadPipeline) Shutdown()
- func (up *UploadPipeline) UnlockForRead(startOffset, stopOffset int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActualChunkIndex ¶
type ActualChunkIndex int
type ChunkWrittenInterval ¶
type ChunkWrittenInterval struct { StartOffset int64 // contains filtered or unexported fields }
ChunkWrittenInterval mark one written interval within one page chunk
func (*ChunkWrittenInterval) Size ¶
func (interval *ChunkWrittenInterval) Size() int64
type ChunkWrittenIntervalList ¶
type ChunkWrittenIntervalList struct {
// contains filtered or unexported fields
}
ChunkWrittenIntervalList mark written intervals within one page chunk
func (*ChunkWrittenIntervalList) IsComplete ¶
func (list *ChunkWrittenIntervalList) IsComplete(chunkSize int64) bool
func (*ChunkWrittenIntervalList) MarkWritten ¶
func (list *ChunkWrittenIntervalList) MarkWritten(startOffset, stopOffset int64)
func (*ChunkWrittenIntervalList) WrittenSize ¶
func (list *ChunkWrittenIntervalList) WrittenSize() (writtenByteCount int64)
type DirtyPages ¶
type DirtyPages interface { AddPage(offset int64, data []byte, isSequential bool) FlushData() error ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64) GetStorageOptions() (collection, replication string) Destroy() LockForRead(startOffset, stopOffset int64) UnlockForRead(startOffset, stopOffset int64) }
type LogicChunkIndex ¶
type LogicChunkIndex int
type MemChunk ¶
type MemChunk struct {
// contains filtered or unexported fields
}
func NewMemChunk ¶
func NewMemChunk(logicChunkIndex LogicChunkIndex, chunkSize int64) *MemChunk
func (*MemChunk) FreeResource ¶
func (mc *MemChunk) FreeResource()
func (*MemChunk) IsComplete ¶
func (*MemChunk) SaveContent ¶
func (mc *MemChunk) SaveContent(saveFn SaveToStorageFunc)
func (*MemChunk) WrittenSize ¶
type SaveToStorageFunc ¶
type SealedChunk ¶
type SealedChunk struct {
// contains filtered or unexported fields
}
func (*SealedChunk) FreeReference ¶
func (sc *SealedChunk) FreeReference(messageOnFree string)
type SwapFile ¶
type SwapFile struct {
// contains filtered or unexported fields
}
func NewSwapFile ¶
func (*SwapFile) FreeResource ¶
func (sf *SwapFile) FreeResource()
func (*SwapFile) NewTempFileChunk ¶
func (sf *SwapFile) NewTempFileChunk(logicChunkIndex LogicChunkIndex) (tc *SwapFileChunk)
type SwapFileChunk ¶
type SwapFileChunk struct {
// contains filtered or unexported fields
}
func (*SwapFileChunk) FreeResource ¶
func (sc *SwapFileChunk) FreeResource()
func (*SwapFileChunk) IsComplete ¶
func (sc *SwapFileChunk) IsComplete() bool
func (*SwapFileChunk) ReadDataAt ¶
func (sc *SwapFileChunk) ReadDataAt(p []byte, off int64) (maxStop int64)
func (*SwapFileChunk) SaveContent ¶
func (sc *SwapFileChunk) SaveContent(saveFn SaveToStorageFunc)
func (*SwapFileChunk) WriteDataAt ¶
func (sc *SwapFileChunk) WriteDataAt(src []byte, offset int64) (n int)
func (*SwapFileChunk) WrittenSize ¶
func (sc *SwapFileChunk) WrittenSize() int64
type UploadPipeline ¶
type UploadPipeline struct { ChunkSize int64 // contains filtered or unexported fields }
func NewUploadPipeline ¶
func NewUploadPipeline(writers *util.LimitedConcurrentExecutor, chunkSize int64, saveToStorageFn SaveToStorageFunc, bufferChunkLimit int, swapFileDir string) *UploadPipeline
func (*UploadPipeline) FlushAll ¶
func (up *UploadPipeline) FlushAll()
func (*UploadPipeline) IsLocked ¶
func (up *UploadPipeline) IsLocked(logicChunkIndex LogicChunkIndex) bool
func (*UploadPipeline) LockForRead ¶
func (up *UploadPipeline) LockForRead(startOffset, stopOffset int64)
func (*UploadPipeline) MaybeReadDataAt ¶
func (up *UploadPipeline) MaybeReadDataAt(p []byte, off int64) (maxStop int64)
func (*UploadPipeline) SaveDataAt ¶
func (up *UploadPipeline) SaveDataAt(p []byte, off int64, isSequential bool) (n int)
func (*UploadPipeline) Shutdown ¶
func (up *UploadPipeline) Shutdown()
func (*UploadPipeline) UnlockForRead ¶
func (up *UploadPipeline) UnlockForRead(startOffset, stopOffset int64)
Click to show internal directories.
Click to hide internal directories.