Versions in this module Expand all Collapse all v0 v0.0.3 Dec 24, 2020 v0.0.2 Dec 24, 2020 v0.0.1 Dec 24, 2020 Changes in this version + const BUFFER_SIZE + const CFD_DATA_CODEC + const CFD_ENTRY_CODEC + const CFD_VERSION_CHECKSUM + const CFD_VERSION_CURRENT + const CFD_VERSION_START + const CHUNK_SIZE + const CODEC_MAGIC_BYTE1 + const CODEC_MAGIC_BYTE2 + const CODEC_MAGIC_BYTE3 + const CODEC_MAGIC_BYTE4 + const COMPOUND_FILE_ENTRIES_EXTENSION + const COMPOUND_FILE_EXTENSION + const DEFAULT_BUFFER_SIZE + const IO_CONTEXT_TYPE_DEFAULT + const IO_CONTEXT_TYPE_FLUSH + const IO_CONTEXT_TYPE_MERGE + const IO_CONTEXT_TYPE_READ + const LOCK_OBTAIN_WAIT_FOREVER + const LOCK_POOL_INTERVAL + const MERGE_BUFFER_SIZE + const MIN_BUFFER_SIZE + const NRT_VERBOSE + var IO_CONTEXT_DEFAULT = NewIOContextFromType(IOContextType(IO_CONTEXT_TYPE_DEFAULT)) + var IO_CONTEXT_READ = NewIOContextBool(false) + var IO_CONTEXT_READONCE = NewIOContextBool(true) + var SENTINEL = make(map[string]FileSlice) + func ChecksumEntireFile(input IndexInput) (hash int64, err error) + func FSDirectoryListAll(path string) (paths []string, err error) + func WithLock(lock Lock, lockWaitTimeout int64, body func() interface{}) interface + type AtomicBool struct + func NewAtomicBool() *AtomicBool + func (b *AtomicBool) CompareAndSet(from, to bool) bool + func (b *AtomicBool) Get() bool + type BaseDirectory struct + IsOpen bool + func NewBaseDirectory(spi BaseDirectorySPI) *BaseDirectory + func (d *BaseDirectory) ClearLock(name string) error + func (d *BaseDirectory) EnsureOpen() + func (d *BaseDirectory) LockFactory() LockFactory + func (d *BaseDirectory) MakeLock(name string) Lock + func (d *BaseDirectory) SetLockFactory(lockFactory LockFactory) + type BaseDirectorySPI interface + LockID func() string + type BufferedChecksum struct + func (bc *BufferedChecksum) BlockSize() int + func (bc *BufferedChecksum) Reset() + func (bc *BufferedChecksum) Size() int + func (bc *BufferedChecksum) Sum(p []byte) []byte + func (bc *BufferedChecksum) Sum32() uint32 + func (bc *BufferedChecksum) Write(p []byte) (int, error) + type BufferedChecksumIndexInput struct + func (in *BufferedChecksumIndexInput) Checksum() int64 + func (in *BufferedChecksumIndexInput) Clone() IndexInput + func (in *BufferedChecksumIndexInput) Close() error + func (in *BufferedChecksumIndexInput) FilePointer() int64 + func (in *BufferedChecksumIndexInput) Length() int64 + func (in *BufferedChecksumIndexInput) ReadByte() (b byte, err error) + func (in *BufferedChecksumIndexInput) ReadBytes(p []byte) (err error) + func (in *BufferedChecksumIndexInput) Slice(desc string, offset, length int64) (IndexInput, error) + type BufferedIndexInput struct + func (in *BufferedIndexInput) Clone() *BufferedIndexInput + func (in *BufferedIndexInput) FilePointer() int64 + func (in *BufferedIndexInput) ReadByte() (b byte, err error) + func (in *BufferedIndexInput) ReadBytes(buf []byte) error + func (in *BufferedIndexInput) ReadBytesBuffered(buf []byte, useBuffer bool) error + func (in *BufferedIndexInput) ReadInt() (n int32, err error) + func (in *BufferedIndexInput) ReadLong() (n int64, err error) + func (in *BufferedIndexInput) ReadShort() (n int16, err error) + func (in *BufferedIndexInput) ReadVInt() (n int32, err error) + func (in *BufferedIndexInput) ReadVLong() (n int64, err error) + func (in *BufferedIndexInput) Seek(pos int64) error + func (in *BufferedIndexInput) Slice(desc string, offset, length int64) (IndexInput, error) + type ByteArrayDataInput struct + Pos int + func NewByteArrayDataInput(bytes []byte) *ByteArrayDataInput + func NewEmptyByteArrayDataInput() *ByteArrayDataInput + func (in *ByteArrayDataInput) Length() int + func (in *ByteArrayDataInput) Position() int + func (in *ByteArrayDataInput) ReadByte() (b byte, err error) + func (in *ByteArrayDataInput) ReadBytes(buf []byte) error + func (in *ByteArrayDataInput) ReadInt() (n int32, err error) + func (in *ByteArrayDataInput) ReadLong() (n int64, err error) + func (in *ByteArrayDataInput) ReadShort() (n int16, err error) + func (in *ByteArrayDataInput) ReadVInt() (n int32, err error) + func (in *ByteArrayDataInput) ReadVLong() (n int64, err error) + func (in *ByteArrayDataInput) Reset(bytes []byte) + func (in *ByteArrayDataInput) Rewind() + func (in *ByteArrayDataInput) SkipBytes(count int64) + type ByteArrayDataOutput struct + func NewByteArrayDataOutput(data []byte) *ByteArrayDataOutput + func (o *ByteArrayDataOutput) Position() int + func (o *ByteArrayDataOutput) WriteByte(b byte) error + func (o *ByteArrayDataOutput) WriteBytes(b []byte) error + type ChecksumIndexInput interface + Checksum func() int64 + type ChecksumIndexInputImpl struct + func NewChecksumIndexInput(desc string, spi ChecksumIndexInputImplSPI) *ChecksumIndexInputImpl + func (in *ChecksumIndexInputImpl) Seek(pos int64) error + type ChecksumIndexInputImplSPI interface + FilePointer func() int64 + type CompoundFileDirectory struct + func NewCompoundFileDirectory(directory Directory, fileName string, context IOContext, openForWrite bool) (d *CompoundFileDirectory, err error) + func (d *CompoundFileDirectory) Close() error + func (d *CompoundFileDirectory) CreateOutput(name string, context IOContext) (out IndexOutput, err error) + func (d *CompoundFileDirectory) DeleteFile(name string) error + func (d *CompoundFileDirectory) FileExists(name string) bool + func (d *CompoundFileDirectory) FileLength(name string) (n int64, err error) + func (d *CompoundFileDirectory) ListAll() (paths []string, err error) + func (d *CompoundFileDirectory) MakeLock(name string) Lock + func (d *CompoundFileDirectory) OpenInput(name string, context IOContext) (in IndexInput, err error) + func (d *CompoundFileDirectory) String() string + func (d *CompoundFileDirectory) Sync(names []string) error + type CompoundFileWriter struct + func (w *CompoundFileWriter) Close() (err error) + type DirectCFSIndexOutput struct + func (out *DirectCFSIndexOutput) Checksum() int64 + func (out *DirectCFSIndexOutput) Close() error + func (out *DirectCFSIndexOutput) FilePointer() int64 + func (out *DirectCFSIndexOutput) Flush() error + func (out *DirectCFSIndexOutput) WriteByte(b byte) error + func (out *DirectCFSIndexOutput) WriteBytes(b []byte) error + type Directory interface + ClearLock func(name string) error + Copy func(to Directory, src, dest string, ctx IOContext) error + CreateOutput func(name string, ctx IOContext) (out IndexOutput, err error) + DeleteFile func(name string) error + EnsureOpen func() + FileExists func(name string) bool + FileLength func(name string) (n int64, err error) + ListAll func() (paths []string, err error) + LockFactory func() LockFactory + LockID func() string + MakeLock func(name string) Lock + OpenChecksumInput func(name string, ctx IOContext) (ChecksumIndexInput, error) + OpenInput func(name string, context IOContext) (in IndexInput, err error) + SetLockFactory func(lockFactory LockFactory) + Sync func(names []string) error + func OpenFSDirectory(path string) (d Directory, err error) + type DirectoryImpl struct + func NewDirectoryImpl(spi DirectoryImplSPI) *DirectoryImpl + func (d *DirectoryImpl) Copy(to Directory, src, dest string, ctx IOContext) (err error) + func (d *DirectoryImpl) LockID() string + func (d *DirectoryImpl) OpenChecksumInput(name string, ctx IOContext) (ChecksumIndexInput, error) + func (d *DirectoryImpl) String() string + type DirectoryImplSPI interface + LockFactory func() LockFactory + OpenInput func(string, IOContext) (IndexInput, error) + type FSDirectory struct + func (d *FSDirectory) Close() error + func (d *FSDirectory) CreateOutput(name string, ctx IOContext) (out IndexOutput, err error) + func (d *FSDirectory) DeleteFile(name string) (err error) + func (d *FSDirectory) FileExists(name string) bool + func (d *FSDirectory) FileLength(name string) (n int64, err error) + func (d *FSDirectory) ListAll() (paths []string, err error) + func (d *FSDirectory) LockID() string + func (d *FSDirectory) SetLockFactory(lockFactory LockFactory) + func (d *FSDirectory) String() string + func (d *FSDirectory) Sync(names []string) (err error) + type FSDirectorySPI interface + OpenInput func(string, IOContext) (IndexInput, error) + type FSIndexOutput struct + func (out *FSIndexOutput) Close() (err error) + type FSLockFactory struct + func (f *FSLockFactory) Clear(name string) error + func (f *FSLockFactory) Make(name string) Lock + func (f *FSLockFactory) String() string + type FileEntry struct + type FileSlice struct + type FilteredWriteCloser struct + func (w *FilteredWriteCloser) Write(p []byte) (int, error) + type FlushInfo struct + EstimatedSegmentSize int64 + NumDocs int + type IOContext struct + FlushInfo *FlushInfo + MergeInfo *MergeInfo + func NewIOContextBool(readOnce bool) IOContext + func NewIOContextForFlush(flushInfo *FlushInfo) IOContext + func NewIOContextForMerge(mergeInfo *MergeInfo) IOContext + func NewIOContextFromType(context IOContextType) IOContext + func (ctx IOContext) String() string + type IOContextType int + type IndexInput interface + Clone func() IndexInput + ReadBytesBuffered func(buf []byte, useBuffer bool) error + Slice func(desc string, offset, length int64) (IndexInput, error) + type IndexInputImpl struct + func NewIndexInputImpl(desc string, r util.DataReader) *IndexInputImpl + func (in *IndexInputImpl) String() string + type IndexInputService interface + FilePointer func() int64 + Length func() int64 + Seek func(pos int64) error + type IndexInputSub interface + FilePointer func() int64 + Length func() int64 + Seek func(pos int64) error + type IndexOutput interface + Checksum func() int64 + FilePointer func() int64 + type IndexOutputImpl struct + func NewIndexOutput(part util.DataWriter) *IndexOutputImpl + type IndexOutputStream struct + func Stream(out IndexOutput) *IndexOutputStream + func (ios *IndexOutputStream) Close() error + func (ios *IndexOutputStream) WriteByte(b byte) *IndexOutputStream + func (ios *IndexOutputStream) WriteBytes(b []byte) *IndexOutputStream + func (ios *IndexOutputStream) WriteInt(i int32) *IndexOutputStream + func (ios *IndexOutputStream) WriteLong(l int64) *IndexOutputStream + func (ios *IndexOutputStream) WriteString(s string) *IndexOutputStream + func (ios *IndexOutputStream) WriteStringSet(m map[string]bool) *IndexOutputStream + func (ios *IndexOutputStream) WriteStringStringMap(m map[string]string) *IndexOutputStream + func (ios *IndexOutputStream) WriteVInt(i int32) *IndexOutputStream + type Lock interface + IsLocked func() bool + Obtain func() (ok bool, err error) + ObtainWithin func(lockWaitTimeout int64) (ok bool, err error) + type LockFactory interface + Clear func(name string) error + LockPrefix func() string + Make func(name string) Lock + SetLockPrefix func(prefix string) + type LockFactoryImpl struct + func (f *LockFactoryImpl) LockPrefix() string + func (f *LockFactoryImpl) SetLockPrefix(prefix string) + type LockImpl struct + func NewLockImpl(self Lock) *LockImpl + func (lock *LockImpl) ObtainWithin(lockWaitTimeout int64) (locked bool, err error) + type MergeInfo struct + EstimatedMergeBytes int64 + IsExternal bool + MergeMaxNumSegments int + TotalDocCount int + type MultiLevelSkipListWriter struct + func NewMultiLevelSkipListWriter(spi MultiLevelSkipListWriterSPI, ...) *MultiLevelSkipListWriter + func (w *MultiLevelSkipListWriter) BufferSkip(df int) error + func (w *MultiLevelSkipListWriter) ResetSkip() + func (w *MultiLevelSkipListWriter) WriteSkip(output IndexOutput) (int64, error) + type MultiLevelSkipListWriterSPI interface + WriteSkipData func(level int, skipBuffer IndexOutput) error + type NRTCachingDirectory struct + func NewNRTCachingDirectory(delegate Directory, maxMergeSizeMB, maxCachedMB float64) (nrt *NRTCachingDirectory) + func (nrt *NRTCachingDirectory) Close() error + func (nrt *NRTCachingDirectory) CreateOutput(name string, context IOContext) (out IndexOutput, err error) + func (nrt *NRTCachingDirectory) DeleteFile(name string) error + func (nrt *NRTCachingDirectory) FileExists(name string) bool + func (nrt *NRTCachingDirectory) FileLength(name string) (length int64, err error) + func (nrt *NRTCachingDirectory) ListAll() (all []string, err error) + func (nrt *NRTCachingDirectory) OpenInput(name string, context IOContext) (in IndexInput, err error) + func (nrt *NRTCachingDirectory) String() string + func (nrt *NRTCachingDirectory) Sync(fileNames []string) (err error) + type NoSuchDirectoryError struct + func (err *NoSuchDirectoryError) Error() string + type OutputStreamIndexOutput struct + func (out *OutputStreamIndexOutput) Checksum() int64 + func (out *OutputStreamIndexOutput) Close() error + func (out *OutputStreamIndexOutput) FilePointer() int64 + func (out *OutputStreamIndexOutput) WriteByte(b byte) error + func (out *OutputStreamIndexOutput) WriteBytes(p []byte) error + type RAMDirectory struct + func NewRAMDirectory() *RAMDirectory + func (d *RAMDirectory) LockID() string + func (d *RAMDirectory) PutRAMFile(name string, file *RAMFile) + func (rd *RAMDirectory) ChangeSize(diff int64) + func (rd *RAMDirectory) Close() error + func (rd *RAMDirectory) CreateOutput(name string, context IOContext) (out IndexOutput, err error) + func (rd *RAMDirectory) DeleteFile(name string) error + func (rd *RAMDirectory) FileExists(name string) bool + func (rd *RAMDirectory) FileLength(name string) (length int64, err error) + func (rd *RAMDirectory) GetRAMFile(name string) *RAMFile + func (rd *RAMDirectory) ListAll() (names []string, err error) + func (rd *RAMDirectory) OpenInput(name string, context IOContext) (in IndexInput, err error) + func (rd *RAMDirectory) RamBytesUsed() int64 + func (rd *RAMDirectory) String() string + func (rd *RAMDirectory) Sync(names []string) error + type RAMFile struct + func NewRAMFile(directory *RAMDirectory) *RAMFile + func NewRAMFileBuffer() *RAMFile + func (rf *RAMFile) Buffer(index int) []byte + func (rf *RAMFile) Length() int64 + func (rf *RAMFile) RamBytesUsed() int64 + func (rf *RAMFile) SetLength(length int64) + type RAMInputStream struct + func (in *RAMInputStream) Clone() IndexInput + func (in *RAMInputStream) Close() error + func (in *RAMInputStream) FilePointer() int64 + func (in *RAMInputStream) Length() int64 + func (in *RAMInputStream) ReadByte() (byte, error) + func (in *RAMInputStream) ReadBytes(buf []byte) error + func (in *RAMInputStream) Seek(pos int64) error + func (in *RAMInputStream) Slice(desc string, offset, length int64) (IndexInput, error) + func (in *RAMInputStream) String() string + type RAMOutputStream struct + func NewRAMOutputStream(f *RAMFile, checksum bool) *RAMOutputStream + func NewRAMOutputStreamBuffer() *RAMOutputStream + func (out *RAMOutputStream) Checksum() int64 + func (out *RAMOutputStream) Close() error + func (out *RAMOutputStream) FilePointer() int64 + func (out *RAMOutputStream) Flush() error + func (out *RAMOutputStream) Reset() + func (out *RAMOutputStream) WriteByte(b byte) error + func (out *RAMOutputStream) WriteBytes(buf []byte) error + func (out *RAMOutputStream) WriteTo(output util.DataOutput) error + func (out *RAMOutputStream) WriteToBytes(bytes []byte) error + type RateLimitedDirectoryWrapper struct + func NewRateLimitedDirectoryWrapper(wrapped Directory) *RateLimitedDirectoryWrapper + func (w *RateLimitedDirectoryWrapper) CreateOutput(name string, ctx IOContext) (IndexOutput, error) + func (w *RateLimitedDirectoryWrapper) MaxWriteMBPerSec(context int) + func (w *RateLimitedDirectoryWrapper) SetMaxWriteMBPerSec(mbPerSec float64, context int) + type RateLimitedIndexOutput struct + func (out *RateLimitedIndexOutput) Checksum() int64 + func (out *RateLimitedIndexOutput) Close() error + func (out *RateLimitedIndexOutput) FilePointer() int64 + func (out *RateLimitedIndexOutput) WriteByte(b byte) error + func (out *RateLimitedIndexOutput) WriteBytes(p []byte) error + type RateLimiter interface + MbPerSec func() float64 + Pause func(bytes int64) int64 + SetMbPerSec func(mbPerSec float64) + type SeekReader interface + Length func() int64 + type SimpleFSDirectory struct + func NewSimpleFSDirectory(path string) (d *SimpleFSDirectory, err error) + func (d *SimpleFSDirectory) OpenInput(name string, context IOContext) (IndexInput, error) + type SimpleFSIndexInput struct + func (in *SimpleFSIndexInput) Clone() IndexInput + func (in *SimpleFSIndexInput) Close() error + func (in *SimpleFSIndexInput) Length() int64 + func (in *SimpleFSIndexInput) Slice(desc string, offset, length int64) (IndexInput, error) + type SimpleFSLock struct + func (lock *SimpleFSLock) Close() error + func (lock *SimpleFSLock) IsLocked() bool + func (lock *SimpleFSLock) Obtain() (ok bool, err error) + func (lock *SimpleFSLock) String() string + type SimpleFSLockFactory struct + func NewSimpleFSLockFactory(path string) *SimpleFSLockFactory + func (f *SimpleFSLockFactory) Clear(name string) error + func (f *SimpleFSLockFactory) Make(name string) Lock + type SimpleRateLimiter struct + func (srl *SimpleRateLimiter) MbPerSec() float64 + func (srl *SimpleRateLimiter) Pause(bytes int64) int64 + func (srl *SimpleRateLimiter) SetMbPerSec(mbPerSec float64) + type SingleInstanceLock struct + func (lock *SingleInstanceLock) Close() error + func (lock *SingleInstanceLock) IsLocked() bool + func (lock *SingleInstanceLock) Obtain() (ok bool, err error) + func (lock *SingleInstanceLock) String() string + type SingleInstanceLockFactory struct + func (fac *SingleInstanceLockFactory) Clear(name string) error + func (fac *SingleInstanceLockFactory) Make(name string) Lock + func (fac *SingleInstanceLockFactory) String() string + type TrackingDirectoryWrapper struct + func NewTrackingDirectoryWrapper(other Directory) *TrackingDirectoryWrapper + func (w *TrackingDirectoryWrapper) ContainsFile(name string) bool + func (w *TrackingDirectoryWrapper) Copy(to Directory, src, dest string, ctx IOContext) error + func (w *TrackingDirectoryWrapper) CreateOutput(name string, ctx IOContext) (IndexOutput, error) + func (w *TrackingDirectoryWrapper) DeleteFile(name string) error + func (w *TrackingDirectoryWrapper) EachCreatedFiles(f func(name string)) + func (w *TrackingDirectoryWrapper) String() string