Documentation ¶
Index ¶
- Constants
- type FetchLivenessReportRequestStruct
- type FetchLivenessReportResponseStruct
- type HeartBeatRequestStruct
- type HeartBeatResponseStruct
- type LivenessReportStruct
- type MsgType
- type MsgTypeStruct
- type ObservingPeerStruct
- type ReconEndpointStruct
- type RequestVoteRequestStruct
- type RequestVoteResponseStruct
- type ServingPeerStruct
- type VolumeGroupStruct
- type VolumeStruct
Constants ¶
View Source
const ( StateAlive = "alive" StateDead = "dead" StateUnknown = "unknown" )
View Source
const ( PrivateClusterUDPPortDefault = uint16(8123) UDPPacketSizeMin = uint64(1000) // Presumably >> udpPacketHeaderSize UDPPacketSizeMax = uint64(8000) // Presumably >> udpPacketHeaderSize UDPPacketSendSizeDefault = uint64(1400) UDPPacketRecvSizeDefault = uint64(1500) UDPPacketCapPerMessageDefault = uint8(math.MaxUint8) HeartBeatDurationDefault = "1s" HeartBeatMissLimitMin = uint64(2) HeartBeatMissLimitDefault = uint64(3) MessageQueueDepthPerPeerMin = uint64(1) MessageQueueDepthPerPeerDefault = uint64(4) MaxRequestDurationDefault = "1s" LivenessCheckRedundancyMin = uint64(1) LivenessCheckRedundancyDefault = uint64(2) LogLevelNone = uint64(0) LogLevelStateChanges = uint64(1) LogLevelMessages = uint64(2) LogLevelMessageDetails = uint64(3) LogLevelMax = uint64(4) LogLevelDefault = LogLevelNone DefaultSwiftReconNoWriteThreshold = 80 DefaultSwiftReconReadOnlyThreshold = 90 DefaultSwiftConfDir = "/etc/swift" DefaultSwiftReconChecksPerConfCheck = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchLivenessReportRequestStruct ¶
type FetchLivenessReportRequestStruct struct { MsgType MsgType // == MsgTypeFetchLivenessReportRequest // Used to request Liveness Report from who we think is the Leader MsgTag uint64 // Used for matching this FetchLivenessReportRequestStruct to a subsequent FetchLivenessReportResponseStruct CurrentTerm uint64 }
type FetchLivenessReportResponseStruct ¶
type FetchLivenessReportResponseStruct struct { MsgType MsgType // == MsgTypeFetchLivenessReportResponse MsgTag uint64 // Used for matching this FetchLivenessReportResponseStruct to a previous FetchLivenessReportRequestStruct CurrentTerm uint64 // == LeaderTerm if Success === true (by definition) CurrentLeader string // If Success == false, this is who should actually be contacted for this (if known) Success bool // == true if Leader is responding; == false if we are not the Leader LivenessReport *LivenessReportStruct // Liveness Report as collected by Leader }
type HeartBeatRequestStruct ¶
type HeartBeatRequestStruct struct { MsgType MsgType // == MsgTypeHeartBeatRequest MsgTag uint64 // Used for matching this HeartBeatRequestStruct to a subsequent HeartBeatResponseStruct LeaderTerm uint64 NewRWMode inode.RWModeType // One of inode.RWModeNormal, inode.RWModeNoWrite, or inode.RWModeReadOnly ToObserve *ObservingPeerStruct // VolumeStruct.State & VolumeStruct.LastCheckTime are ignored }
type HeartBeatResponseStruct ¶
type HeartBeatResponseStruct struct { MsgType MsgType // == MsgTypeHeartBeatResponse MsgTag uint64 // Used for matching this HeartBeatResponseStruct to a previous HeartBeatRequestStruct CurrentTerm uint64 Success bool Observed *ObservingPeerStruct }
type LivenessReportStruct ¶
type LivenessReportStruct struct {
ObservingPeer []*ObservingPeerStruct
}
func FetchLivenessReport ¶
func FetchLivenessReport() (livenessReport *LivenessReportStruct)
type MsgTypeStruct ¶
type ObservingPeerStruct ¶
type ObservingPeerStruct struct { Name string ServingPeer []*ServingPeerStruct ReconEndpoint []*ReconEndpointStruct }
type ReconEndpointStruct ¶
type ServingPeerStruct ¶
type ServingPeerStruct struct { Name string State string // One of const State{Alive|Dead|Unknown} LastCheckTime time.Time VolumeGroup []*VolumeGroupStruct }
type VolumeGroupStruct ¶
type VolumeGroupStruct struct { Name string State string // One of const State{Alive|Dead|Unknown} LastCheckTime time.Time Volume []*VolumeStruct }
Click to show internal directories.
Click to hide internal directories.