Documentation for Stdcandidateselector Module¶
STDandidateSelector
¶
Bases: CandidateSelector
Candidate selector for scenarios without a predefined structural topology.
In cases where the federation topology is not explicitly structured, this selector chooses candidates based on the average number of neighbors indicated in their offers. It selects approximately as many candidates as the average neighbor count, aiming to balance connectivity dynamically.
Attributes:
Name | Type | Description |
---|---|---|
candidates |
list
|
List of candidate nodes available for selection. |
candidates_lock |
Locker
|
Async lock to ensure thread-safe access to candidates. |
Methods:
Name | Description |
---|---|
set_config |
Optional configuration method. |
add_candidate |
Adds a candidate node to the candidate list. |
select_candidates |
Selects candidates based on the average neighbor count from offers. |
remove_candidates |
Clears the candidates list. |
any_candidate |
Returns True if there is at least one candidate available. |
Inherits from
CandidateSelector: Base interface for candidate selection strategies.
Source code in nebula/core/situationalawareness/discovery/candidateselection/stdcandidateselector.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
select_candidates()
async
¶
Select mean number of neighbors
Source code in nebula/core/situationalawareness/discovery/candidateselection/stdcandidateselector.py
43 44 45 46 47 48 49 50 51 52 53 |
|