Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuoSpecQ ¶
func NewQuoSpecQ(rqSize, wqSize int) q.QuorumSpec
NewQuoSpecQ has quorum sizes for read and write quorum function as input. It returns a quorum spec
func NewQuoSpecQError ¶
func NewQuoSpecQError(rqSize, wqSize int) q.QuorumSpec
NewQuoSpecQError has quorum sizes for read and write quorum function as input. It returns a quorum spec
Types ¶
type QuoSpecQ ¶
type QuoSpecQ struct {
// contains filtered or unexported fields
}
QuoSpecQ is the quorum specification for the Quorum algorithm.
func (QuoSpecQ) ReadQF ¶
Assumed correct ReadQF: Returns nil and false until the supplied replies. The method returns the single highest value and true.
func (QuoSpecQ) WriteQF ¶
func (qq QuoSpecQ) WriteQF(replies []*q.WriteResponse) (*q.WriteResponse, bool)
Assumed correct WriteQF: Returns WRITENACK (false or nil) and false until it is possible to check for a quorum. If enough replies, we return WRITEACK (true or the first reply) and true.
type QuoSpecQError ¶
type QuoSpecQError struct {
// contains filtered or unexported fields
}
Programming error scenarios for ReadQF and WriteQF Error scenario one: number of replies and quorum size error in WriteQF Error scenario two: the result of the reply with the highest timestamp error in ReadQF QuoSpecQError is the quorum specification for testing QuorumError scenario.
func (QuoSpecQError) ReadQF ¶
Assumed error ReadQF Error scenario for ReadQF: the result of the reply with the highest timestamp error
func (QuoSpecQError) WriteQF ¶
func (qq QuoSpecQError) WriteQF(replies []*q.WriteResponse) (*q.WriteResponse, bool)
Assumed error WriteQF Error scenario for WriteQF: number of replies and quorum size error