Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
func MakeFileStorage ¶
func MakeFileStorage(diskPath string, persistenceMode string) (*FileStorage, error)
MakeFileStorage opens the files for persistent storage
func (*FileStorage) PersistLogUpdate ¶
func (fs *FileStorage) PersistLogUpdate(log msgs.LogUpdate) error
PersistLogUpdate writes the specified log update to persistent storage Function returns when write+sync is completed Error is returned if it was not possible to write
func (*FileStorage) PersistSnapshot ¶
func (fs *FileStorage) PersistSnapshot(index int, bytes []byte) error
PersistSnapshot writes the provided snapshot to persistent storage index should be the index of the last request applied to be state machine before snapshoting
func (*FileStorage) PersistView ¶
func (fs *FileStorage) PersistView(view int) error
PersistView writes view update to persistent storage Function returns when write+sync is completed Error is returned if it was not possible to write
Click to show internal directories.
Click to hide internal directories.