Last active
December 9, 2021 12:23
-
-
Save samueleresca/621ac3cfc41482447edb8d004ac71dc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// QuorumSystem describes a read-write quorum system. | |
type QuorumSystem struct { | |
// reads describes the read-quorum. | |
reads Expr | |
// writes describes the write-quorum. | |
writes Expr | |
// nameToNode keeps track the name of a node to a GetNodeByName. | |
nameToNode nameToNode | |
} | |
// Capacity calculate and gets the capacity from the optimized Strategy. | |
func (qs QuorumSystem) Capacity(strategyOptions StrategyOptions) (float64, error) { | |
... | |
} | |
// Latency calculate and gets the latency from the optimized Strategy. | |
func (qs QuorumSystem) Latency(strategyOptions StrategyOptions) (float64, error) { | |
... | |
} | |
// Load calculate and gets the Load from the optimized Strategy. | |
func (qs QuorumSystem) Load(strategyOptions StrategyOptions) (float64, error) { | |
... | |
} | |
// NetworkLoad calculate and gets the NetworkLoad from the optimized Strategy. | |
func (qs QuorumSystem) NetworkLoad(strategyOptions StrategyOptions) (float64, error) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment