Documentation ¶
Index ¶
- Constants
- func CreateFlagFile(dir string, filename string, msg proto.Message) error
- func Exist(name string) bool
- func GetAppNameFromFilename(soName string) string
- func GetFlagFileContent(dir string, filename string, msg proto.Message) error
- func GetPossibleCPPSOFiles(path string) []string
- func GetPossibleSOFiles(path string) []string
- func HasFlagFile(dir string, filename string) bool
- func MkdirAll(dir string) error
- func RemoveFlagFile(dir string, filename string) error
- func SyncDir(dir string) error
- type ChunkFile
Constants ¶
const ( // DefaultFileMode is the default file mode for files generated by // Dragonboat. DefaultFileMode = 0640 )
const (
// SnapshotFlagFilename defines the filename of the snapshot flag file.
SnapshotFlagFilename = "dragonboat.snapshot.message"
)
Variables ¶
This section is empty.
Functions ¶
func CreateFlagFile ¶
CreateFlagFile creates a flag file in the specific location. The flag file contains the marshaled data of the specified protobuf message.
func GetAppNameFromFilename ¶
GetAppNameFromFilename returns the app name from the filename.
func GetFlagFileContent ¶
GetFlagFileContent gets the content of the flag file found in the specified location. The data of the flag file will be unmarshaled into the specified protobuf message.
func GetPossibleCPPSOFiles ¶
GetPossibleCPPSOFiles returns a list of possible .so files found in the specified path.
func GetPossibleSOFiles ¶
GetPossibleSOFiles returns a list of possible .so files.
func HasFlagFile ¶
HasFlagFile returns a boolean value indicating whether flag file can be found in the specified location.
func RemoveFlagFile ¶
RemoveFlagFile removes the specified flag file.
Types ¶
type ChunkFile ¶
type ChunkFile struct {
// contains filtered or unexported fields
}
ChunkFile is the snapshot chunk file being transferred.
func CreateChunkFile ¶
CreateChunkFile creates a new chunk file.
func OpenChunkFileForAppend ¶
OpenChunkFileForAppend opens the chunk file at fp for appending.
func OpenChunkFileForRead ¶
OpenChunkFileForRead opens for the chunk file for read-only operation.
func (*ChunkFile) SeekFromBeginning ¶
SeekFromBeginning seeks the underlying file from the beginning.