Documentation ¶
Index ¶
- func AppendBytes(chunks ...[]byte) []byte
- func Entry(now uint32, key, val []byte) []byte
- func U32ToB(i uint32) []byte
- type FS
- func (fs *FS) AddMockDataFileEntry(fName string, entry []byte)
- func (fs *FS) UseMockDataFiles() *FS
- func (fs *FS) VerifyDataFileIsRotated(t *testing.T)
- func (fs *FS) VerifyEntryWritten(t *testing.T, entry []byte)
- func (fs *FS) VerifyWriteGoesToNewlyActiveDataFile(t *testing.T)
- func (fs *FS) WithFailOnReadValueFromFile(err error) *FS
- func (fs *FS) WithFailWithErrOnWrite(err error) *FS
- func (fs *FS) WithMockValue(val []byte) *FS
- func (fs *FS) WithMockWriteSupport() *FS
- func (fs *FS) WithToppedUpDataFile(atSize int64) *FS
- type InMemory
- func (i *InMemory) Open(path string) (cask.File, error)
- func (i *InMemory) ReadFileAt(path string, file string, b []byte, offset int64) (int, error)
- func (i *InMemory) Rotate(path string) (cask.File, error)
- func (i *InMemory) Walk(path string, f func(cask.File) error) error
- func (i *InMemory) WithPartialWriteFor(key []byte) *InMemory
- type InMemoryFile
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendBytes ¶
Types ¶
type FS ¶
FS is a mock FS
func (*FS) AddMockDataFileEntry ¶
AddMockDataFileEntry adds entry to a mock data file
func (*FS) UseMockDataFiles ¶
UseMockDataFiles uses mocked in memory files (set by AddMockDataFileEntry)
func (*FS) VerifyDataFileIsRotated ¶
VerifyDataFileIsRotated verifies that current active data file has been closed and that new one has been opened
func (*FS) VerifyEntryWritten ¶
VerifyEntryWritten verifies that entry was bytesWritten
func (*FS) VerifyWriteGoesToNewlyActiveDataFile ¶
func (*FS) WithFailOnReadValueFromFile ¶
func (*FS) WithFailWithErrOnWrite ¶
WithFailWithErrOnWrite setup
func (*FS) WithMockWriteSupport ¶
WithMockWriteSupport setup
func (*FS) WithToppedUpDataFile ¶
WithToppedUpDataFile setup
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func (*InMemory) ReadFileAt ¶
func (*InMemory) WithPartialWriteFor ¶
type InMemoryFile ¶
type InMemoryFile struct {
// contains filtered or unexported fields
}
func (*InMemoryFile) Close ¶
func (i *InMemoryFile) Close() error
func (*InMemoryFile) Name ¶
func (i *InMemoryFile) Name() string
func (*InMemoryFile) Size ¶
func (i *InMemoryFile) Size() int64
Click to show internal directories.
Click to hide internal directories.