Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ahelwer/PaxosCluster
/ functions
Functions
69 in github.com/ahelwer/PaxosCluster
⨍
Functions
69
◇
Types & classes
16
↓ 7 callers
Method
IsGreaterThan
Comparison operator
proposal/id.go:48
↓ 4 callers
Function
Default
Returns the default proposal ID; will be outranked by every other proposal ID
proposal/id.go:25
↓ 4 callers
Method
GetFirstUnchosenIndex
Returns the index of the first entry in the log for which no value has been chosen
replicatedlog/replicatedlog.go:73
↓ 4 callers
Function
recoveryFileExists
Checks for existence of specified file in this role's recovery directory.
recovery/recovery.go:232
↓ 3 callers
Method
GenerateNextProposalId
Generates & returns a new proposal ID
proposal/manager/manager.go:43
↓ 3 callers
Method
IsChosen
Checks for chosen flag
proposal/id.go:43
↓ 3 callers
Method
SetEntryAt
Sets the value of the log entry at the specified index
replicatedlog/replicatedlog.go:152
↓ 3 callers
Method
SetPromiseRequirement
Mark whether a promise is required from a node before sending accept requests
clusterpeers/clusterpeers.go:194
↓ 3 callers
Function
idempotentCreateRecoveryDir
Creates recovery directory if it does not exist. This function is idempotent.
recovery/recovery.go:221
↓ 3 callers
Function
openRecoveryFile
Opens the specified file from this role's recovery directory.
recovery/recovery.go:258
↓ 3 callers
Method
updateFirstUnchosenIndex
Updates the location of the first unchosen index; exclude MUST be locked before calling
replicatedlog/replicatedlog.go:81
↓ 3 callers
Method
wrapReply
Wraps RPC return data to remove direct dependency of caller on net/rpc and improve testability
clusterpeers/clusterpeers.go:322
↓ 2 callers
Method
BroadcastProposalRequest
Broadcasts a proposal phase request to the cluster
clusterpeers/clusterpeers.go:291
↓ 2 callers
Method
GetEntryAt
Returns details of the log entry at the specified index
replicatedlog/replicatedlog.go:133
↓ 2 callers
Method
GetMinProposalId
Returns the minimum proposal for this log; all lesser proposals should be rejected
replicatedlog/replicatedlog.go:49
↓ 2 callers
Method
UpdateCurrentProposalId
(roleId uint64, id proposal.Id)
recovery/recovery.go:91
↓ 2 callers
Method
UpdateLogRecord
Updates a record in the replicated log on disk.
recovery/recovery.go:146
↓ 2 callers
Function
createRecoveryFile
Creates or overwrites the specified file in this role's recovery directory.
recovery/recovery.go:248
↓ 2 callers
Method
notifyOfSuccess
Explicitly transfer chosen values to a role which is missing that information
proposer/proposer.go:247
↓ 2 callers
Function
recoverProposalId
Reads proposal ID from the given file.
recovery/recovery.go:184
↓ 2 callers
Function
updateProposalId
Updates the proposal ID value in the given file.
recovery/recovery.go:206
↓ 1 callers
Method
Accept
(proposal *ProposalReq, reply *ProposalResp)
acceptor/acceptor.go:67
↓ 1 callers
Method
BroadcastHeartbeat
Sends pulse to all nodes in the cluster
clusterpeers/clusterpeers.go:214
↓ 1 callers
Method
BroadcastPrepareRequest
Broadcasts a prepare phase request to the cluster
clusterpeers/clusterpeers.go:264
↓ 1 callers
Method
Connect
Initializes connections to cluster peers
clusterpeers/clusterpeers.go:120
↓ 1 callers
Method
GetCurrentProposalId
Returns the most current proposal ID generated by this manager
proposal/manager/manager.go:35
↓ 1 callers
Method
GetPeerCount
Returns number of peers in cluster
clusterpeers/clusterpeers.go:178
↓ 1 callers
Method
GetSkipPromiseCount
Returns number of peers from which no promise is required
clusterpeers/clusterpeers.go:186
↓ 1 callers
Method
Listen
Sets server to listen on this node's port
clusterpeers/clusterpeers.go:97
↓ 1 callers
Method
MarkAsChosen
Marks all log entries with the given proposalId as chosen, up to the given index
replicatedlog/replicatedlog.go:115
↓ 1 callers
Method
NoMoreAcceptedPast
Certifies that no proposals have been accepted past the specified index
replicatedlog/replicatedlog.go:97
↓ 1 callers
Method
NotifyOfSuccess
Directly notifies a specific node of a chosen value
clusterpeers/clusterpeers.go:311
↓ 1 callers
Method
RecoverCurrentProposalId
(roleId uint64)
recovery/recovery.go:84
↓ 1 callers
Method
RecoverLog
Recovers replicated log from disk.
recovery/recovery.go:114
↓ 1 callers
Method
RecoverMinProposalId
Recovers the MinProposalId from disk.
recovery/recovery.go:99
↓ 1 callers
Method
RetrieveAddresses
Reads the list of peers from a file on disk
recovery/recovery.go:52
↓ 1 callers
Method
String
Custom string formatter for ID
proposal/id.go:59
↓ 1 callers
Method
UpdateMinProposalId
(roleId uint64, id proposal.Id)
recovery/recovery.go:106
↓ 1 callers
Method
connectionManager
Triages connection complaints, organizes repair attempts
clusterpeers/clusterpeers.go:136
↓ 1 callers
Method
electLeader
Elects self leader if not receiving heartbeat signal from role with higher ID
proposer/proposer.go:66
↓ 1 callers
Method
emit
Emits chosen value to the registered callback function (currently just print to console)
replicatedlog/replicatedlog.go:184
↓ 1 callers
Method
establishConnection
Attempts to re-connect to the specified role
clusterpeers/clusterpeers.go:155
↓ 1 callers
Method
finalize
Finishes all writes and permanently locks in preparation for shutdown
recovery/recovery.go:44
↓ 1 callers
Method
isLeaderState
Role is leader; will furnish client requests
proposer/proposer.go:79
↓ 1 callers
Method
isNotLeaderState
Role is not leader; will reject client requests
proposer/proposer.go:46
↓ 1 callers
Method
paxos
Executes single round of Paxos protocol
proposer/proposer.go:97
↓ 1 callers
Method
processAllAccepts
(request acceptor.ProposalReq, peerCount uint64, received map[uint64]bool, endpoint <-chan clusterpeers.Respon
proposer/proposer.go:223
↓ 1 callers
Method
recvAccepts
Receves replies to proposal
proposer/proposer.go:190
↓ 1 callers
Method
recvPromises
Receves replies to prepare requests
proposer/proposer.go:152
Function
Chosen
Returns a proposal ID flagged as chosen
proposal/id.go:34
Function
Construct
Constructor for ProposerRole
proposer/proposer.go:24
Function
Construct
Constructor for AcceptorRole
acceptor/acceptor.go:18
Function
ConstructCluster
(roleId uint64, disk *recovery.Manager)
clusterpeers/clusterpeers.go:34
Function
ConstructLog
Creates a new replicated log instance, using data from cold storage files
replicatedlog/replicatedlog.go:27
Function
ConstructManager
Creates disk access manager for backup & recovery files
recovery/recovery.go:30
Function
ConstructProposalId
Creates a proposal ID from a role and sequence number
proposal/id.go:16
Function
ConstructProposalManager
Constructor for the proposal manager
proposal/manager/manager.go:19
Function
DeserializeFromCSV
Recover proposal ID from an array of strings
proposal/id.go:79
Method
GenerateProposalIdToBeat
Generates & returns a new proposal ID which will outrank the given proposal ID
proposal/manager/manager.go:57
Method
Heartbeat
Catches heartbeat signal as a remote procedure call
proposer/proposer.go:274
Function
LaunchNode
Initialize proposer and acceptor roles
role/role.go:15
Method
Prepare
(req *PrepareReq, reply *PrepareResp)
acceptor/acceptor.go:38
Method
Replicate
Receives requests from client
proposer/proposer.go:289
Function
Run
Starts proposer role state machine
proposer/proposer.go:38
Function
SerializeToCSV
Convert to array of strings for storage in CSV file
proposal/id.go:68
Method
Success
(info *SuccessNotify, reply *int)
acceptor/acceptor.go:86
Method
Terminate
Receives termination command
proposer/proposer.go:305
Method
UpdateMinProposalId
Updates minProposalId to the greater of itself and the provided proposalId
replicatedlog/replicatedlog.go:57
Function
main
()
simplecluster.go:11