Documentation ¶
Index ¶
Constants ¶
View Source
const ( COLLECT_CHECK_STATS_INTERVAL = time.Duration(5 * time.Second) UNTAGGED_MEMBER_MAP_ENTRY = "!UNTAGGED!" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Director ¶
type Director struct { MemberID string Config *config.Config Log log.FieldLogger State bool StateChan <-chan bool DistributeChan <-chan bool OverwatchChan chan<- *overwatch.Message StateLock *sync.Mutex DalClient dal.IDal CheckStatsLooper looper.Looper CheckStats map[string]*dal.MemberStat CheckStatsMutex *sync.Mutex base.Component }
func (*Director) PickNextMember ¶
Return the least taxed cluster member
If check stats are blank; return our own memberid:
- if the check tag is blank and we have no tags
- if the check tag is the same as one of our own tags
- else, return a "no feasible members found" error
If check stats are not blank:
- build a 'feasible members' slice
- determine if any of the feasible members have the 'checkTag'
- if not, return a "no feasible members found" error
Click to show internal directories.
Click to hide internal directories.