status

package
v1.11.0-cni-plu...-aa3fb74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Run runs the node status reporter.

func Show

func Show()

Show prints status information from all populators.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL