Documentation ¶
Index ¶
- func NewWeightedMemberStrategy(kind string) cluster.MemberStrategy
- type WeightedMemberStatusValue
- type WeightedMemberStatusValueSerializer
- type WeightedMemberStrategy
- func (m *WeightedMemberStrategy) AddMember(member *cluster.MemberStatus)
- func (m *WeightedMemberStrategy) GetActivator() string
- func (m *WeightedMemberStrategy) GetAllMembers() []*cluster.MemberStatus
- func (m *WeightedMemberStrategy) GetPartition(key string) string
- func (m *WeightedMemberStrategy) RemoveMember(member *cluster.MemberStatus)
- func (m *WeightedMemberStrategy) UpdateMember(member *cluster.MemberStatus)
- type WeightedRoundRobin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWeightedMemberStrategy ¶
func NewWeightedMemberStrategy(kind string) cluster.MemberStrategy
Types ¶
type WeightedMemberStatusValue ¶
type WeightedMemberStatusValue struct {
Weight int
}
func (*WeightedMemberStatusValue) IsSame ¶
func (sv *WeightedMemberStatusValue) IsSame(val cluster.MemberStatusValue) bool
type WeightedMemberStatusValueSerializer ¶
type WeightedMemberStatusValueSerializer struct{}
func (*WeightedMemberStatusValueSerializer) Deserialize ¶
func (s *WeightedMemberStatusValueSerializer) Deserialize(val string) cluster.MemberStatusValue
func (*WeightedMemberStatusValueSerializer) Serialize ¶
func (s *WeightedMemberStatusValueSerializer) Serialize(val cluster.MemberStatusValue) string
type WeightedMemberStrategy ¶
type WeightedMemberStrategy struct {
// contains filtered or unexported fields
}
func (*WeightedMemberStrategy) AddMember ¶
func (m *WeightedMemberStrategy) AddMember(member *cluster.MemberStatus)
func (*WeightedMemberStrategy) GetActivator ¶
func (m *WeightedMemberStrategy) GetActivator() string
func (*WeightedMemberStrategy) GetAllMembers ¶
func (m *WeightedMemberStrategy) GetAllMembers() []*cluster.MemberStatus
func (*WeightedMemberStrategy) GetPartition ¶
func (m *WeightedMemberStrategy) GetPartition(key string) string
func (*WeightedMemberStrategy) RemoveMember ¶
func (m *WeightedMemberStrategy) RemoveMember(member *cluster.MemberStatus)
func (*WeightedMemberStrategy) UpdateMember ¶
func (m *WeightedMemberStrategy) UpdateMember(member *cluster.MemberStatus)
type WeightedRoundRobin ¶
type WeightedRoundRobin struct {
// contains filtered or unexported fields
}
func NewWeightedRoundRobin ¶
func NewWeightedRoundRobin(memberStrategy cluster.MemberStrategy) *WeightedRoundRobin
func (*WeightedRoundRobin) GetByRoundRobin ¶
func (r *WeightedRoundRobin) GetByRoundRobin() string
func (*WeightedRoundRobin) UpdateRR ¶
func (r *WeightedRoundRobin) UpdateRR()
Click to show internal directories.
Click to hide internal directories.