Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogFile ¶
type LogFile struct { //the segment raft log name FileName string //the segment raft log size, use for NOT finish segment log (last writing segment) //when recover, need create a file with FileSize, and write the entries to this file FileSize uint64 //raft log file : 0 //index file : 1 Type int //whether the segments is finish, should only have one writing file at a time // true: finish // false: writing IsFinish bool // checksum for finish file // for writing file, should check entry one by one Checksum string }
type Message ¶
type Message struct { raftpb.Message ReadCloser io.ReadCloser TotalSize int64 // contains filtered or unexported fields }
func NewMessage ¶
func (Message) CloseNotify ¶
CloseNotify returns a channel that receives a single value when the message sent is finished. true indicates the sent is successful.
func (Message) CloseWithError ¶
type SnapshotMetadata ¶
type SnapshotMetadata struct { // version for snapshot, 0 was use currently Version SnapshotVersion RaftGroupName string // Index and Term store when the snapshot was taken. // NOTE: Index should be last apply index when take snapshot Index uint64 Term uint64 // latest members information , include own server // map[server name : string] URLs, URLs is the server listener address(es) MembersMap types.URLsMap //log files for index log and raft log LogFiles []LogFile }
SnapshotMetadata for the raft group snapshot include all raft relative information
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
/////////////////////////// temp for usage
func (*Snapshotter) SaveDBFrom ¶
Click to show internal directories.
Click to hide internal directories.