chore: fix typo (#180)

This commit is contained in:
klaus 2020-05-22 02:55:09 +08:00 committed by GitHub
parent e620983e76
commit b4a7a561f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ type MessageType int32
const (
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
// the node should passes 'MessageType_MsgHup' to its Step method and start a new election.
// the node should pass 'MessageType_MsgHup' to its Step method and start a new election.
MessageType_MsgHup MessageType = 0
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
// of the 'MessageType_MsgHeartbeat' type to its followers.
@ -219,7 +219,7 @@ func (m *Entry) GetData() []byte {
return nil
}
// SnapshotMetadata cantains the log index and term of the last log applied to this
// SnapshotMetadata contains the log index and term of the last log applied to this
// Snapshot, along with the membership information of the time the last log applied.
type SnapshotMetadata struct {
ConfState *ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state,omitempty"`

View File

@ -23,7 +23,7 @@ message Entry {
bytes data = 4;
}
// SnapshotMetadata cantains the log index and term of the last log applied to this
// SnapshotMetadata contains the log index and term of the last log applied to this
// Snapshot, along with the membership information of the time the last log applied.
message SnapshotMetadata {
ConfState conf_state = 1;
@ -40,7 +40,7 @@ message Snapshot {
// also use the Step method to handle
enum MessageType {
// 'MessageType_MsgHup' is a local message used for election. If an election timeout happened,
// the node should passes 'MessageType_MsgHup' to its Step method and start a new election.
// the node should pass 'MessageType_MsgHup' to its Step method and start a new election.
MsgHup = 0;
// 'MessageType_MsgBeat' is a local message that signals the leader to send a heartbeat
// of the 'MessageType_MsgHeartbeat' type to its followers.