Documentation ¶
Index ¶
- Constants
- type FileProviderSegment
- type FileStorageProvider
- func (sp *FileStorageProvider) CreateDatabase(opts map[string]string) error
- func (sp *FileStorageProvider) Initialize(opts map[string]string)
- func (sp *FileStorageProvider) LockSegment(uuid []byte) bprovider.Segment
- func (sp *FileStorageProvider) Read(uuid []byte, address uint64, buffer []byte) []byte
Constants ¶
View Source
const FIRSTREAD = 3459
This is the size of a maximal size cblock + header
View Source
const NUMFILES = 256
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileProviderSegment ¶
type FileProviderSegment struct {
// contains filtered or unexported fields
}
func (*FileProviderSegment) BaseAddress ¶
func (seg *FileProviderSegment) BaseAddress() uint64
Returns the address of the first free word in the segment when it was locked
func (*FileProviderSegment) Flush ¶
func (seg *FileProviderSegment) Flush()
Block until all writes are complete, not
func (*FileProviderSegment) Unlock ¶
func (seg *FileProviderSegment) Unlock()
Unlocks the segment for the StorageProvider to give to other consumers Implies a flush
type FileStorageProvider ¶
type FileStorageProvider struct {
// contains filtered or unexported fields
}
func (*FileStorageProvider) CreateDatabase ¶
func (sp *FileStorageProvider) CreateDatabase(opts map[string]string) error
Called to create the database for the first time
func (*FileStorageProvider) Initialize ¶
func (sp *FileStorageProvider) Initialize(opts map[string]string)
Called at startup
func (*FileStorageProvider) LockSegment ¶
func (sp *FileStorageProvider) LockSegment(uuid []byte) bprovider.Segment
Lock a segment, or block until a segment can be locked Returns a Segment struct
Click to show internal directories.
Click to hide internal directories.