Documentation
¶
Index ¶
- Variables
- type CombinationPicker
- type ConsistentHashCache
- func (chc *ConsistentHashCache) AddPosition(vUUId *common.VarUUId, pos *common.Positions)
- func (chc *ConsistentHashCache) CreatePositions(vUUId *common.VarUUId, positionsLength int) (*common.Positions, []common.RMId, error)
- func (chc *ConsistentHashCache) GetHashCodes(vUUId *common.VarUUId) ([]common.RMId, error)
- func (chc *ConsistentHashCache) GetPositions(vUUId *common.VarUUId) *common.Positions
- func (chc *ConsistentHashCache) Remove(vUUId *common.VarUUId)
- func (chc *ConsistentHashCache) SetResolver(resolver *Resolver)
- type Resolver
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InsufficientPositionsError = &insufficientPositionsError{}
)
View Source
var (
TooManyDisabledHashCodes = &tooManyDisabledHashCodes{}
)
View Source
var (
VarUUIdNotKnown = &varUUIdNotKnown{}
)
Functions ¶
This section is empty.
Types ¶
type CombinationPicker ¶
type CombinationPicker struct {
// contains filtered or unexported fields
}
func NewCombinationPicker ¶
func NewCombinationPicker(desiredLen int, disabledHashCodes map[common.RMId]server.EmptyStruct) *CombinationPicker
Here, you want desiredLen to be FInc
func (*CombinationPicker) AddPermutation ¶
func (cp *CombinationPicker) AddPermutation(perm common.RMIds)
type ConsistentHashCache ¶
type ConsistentHashCache struct {
// contains filtered or unexported fields
}
func (*ConsistentHashCache) AddPosition ¶
func (chc *ConsistentHashCache) AddPosition(vUUId *common.VarUUId, pos *common.Positions)
func (*ConsistentHashCache) CreatePositions ¶
func (chc *ConsistentHashCache) CreatePositions(vUUId *common.VarUUId, positionsLength int) (*common.Positions, []common.RMId, error)
In here, we don't actually add to the cache because we don't know if the corresponding txn is going to commit or not.
func (*ConsistentHashCache) GetHashCodes ¶
func (*ConsistentHashCache) GetPositions ¶
func (chc *ConsistentHashCache) GetPositions(vUUId *common.VarUUId) *common.Positions
func (*ConsistentHashCache) Remove ¶
func (chc *ConsistentHashCache) Remove(vUUId *common.VarUUId)
func (*ConsistentHashCache) SetResolver ¶
func (chc *ConsistentHashCache) SetResolver(resolver *Resolver)
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
hashCodes is the rmIds from topology - i.e. it can contain RMIdEmpty, and those RMIdEmpties do not contibute to the desiredLength. Here, you want desiredLength to be TwoFInc
func (*Resolver) RMIdHasVar ¶
rmIdIdx is the index of the rmId in question within the topology.RMs() slice.
Click to show internal directories.
Click to hide internal directories.