Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NodeStatusReporter ¶
type NodeStatusReporter struct {
// contains filtered or unexported fields
}
NodeStatusReporter watches node status resource and creates/maintains reporter for each request.
func NewNodeStatusReporter ¶
func NewNodeStatusReporter(node string, cfg *apiconfig.CalicoAPIConfig, client client.Interface, populators PopulatorRegistry) *NodeStatusReporter
NewNodeStatusReporter creates a node status reporter.
func (*NodeStatusReporter) GetNumberOfReporters ¶
func (r *NodeStatusReporter) GetNumberOfReporters() int
Return number of current reporters.
func (*NodeStatusReporter) OnStatusUpdated ¶
func (r *NodeStatusReporter) OnStatusUpdated(status bapi.SyncStatus)
OnStatusUpdated handles the syncer status callback method.
func (*NodeStatusReporter) OnUpdates ¶
func (r *NodeStatusReporter) OnUpdates(updates []bapi.Update)
OnUpdated handles the syncer update callback method.
func (*NodeStatusReporter) Run ¶
func (r *NodeStatusReporter) Run()
Run is the main reconciliation loop, it loops until done. Here the logic for handling syncer updates is
- If we get a value update, cache it to pendingUpdates.
- If we get a inSync message, set inSync to true. We don't need to worry about any status message after inSync message, getting a non-in sync status after an in-sync isn't important here, there's no real impact. It'd just mean that we've got slightly old data.
- After handling syncer event, process pendingUpdates if we are in-sync.
func (*NodeStatusReporter) Stop ¶
func (r *NodeStatusReporter) Stop()
type PopulatorRegistry ¶
Map IPFamily to a map from each class to a populator. Currently all the reporters would have the same populator for each class but it can be extended in the future.
func GetPopulators ¶
func GetPopulators() PopulatorRegistry
getPopulators get current PopulatorRegistry.
Click to show internal directories.
Click to hide internal directories.