Versions in this module Expand all Collapse all v0 v0.7.6 Jun 15, 2024 Changes in this version + const CurrentVersion + const FilePosEmpty + const FullHeaderFmt + const HeaderFmt1 + const HeaderLen + const InitialLockDelay + const InitialLockTries + const LockDelay + type File struct + EndPos int64 + FileDataSize int64 + FileOffset int64 + FlockStatus int + MaxSize int64 + OSFile *os.File + StartPos int64 + Version byte + func CreateCirFile(fileName string, maxSize int64) (*File, error) + func OpenCirFile(fileName string) (*File, error) + func (f *File) AppendData(ctx context.Context, buf []byte) error + func (f *File) Close() error + func (f *File) GetStartOffsetAndSize(ctx context.Context) (int64, int64, error) + func (f *File) ReadAll(ctx context.Context) (int64, []byte, error) + func (f *File) ReadAtWithMax(ctx context.Context, offset int64, maxSize int64) (int64, []byte, error) + func (f *File) ReadMeta(ctx context.Context) error + func (f *File) ReadNext(ctx context.Context, buf []byte, offset int64) (int64, int, error) + func (f *File) WriteAt(ctx context.Context, buf []byte, writePos int64) error + type Stat struct + DataSize int64 + FileOffset int64 + Location string + MaxSize int64 + Version byte + func StatCirFile(ctx context.Context, fileName string) (*Stat, error)