monitor

package
v0.0.0-...-871ec6c Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const IDClusterClaim = "id.k8s.io"

Variables

This section is empty.

Functions

func Find

Find returns a bool if the item exists in the given slice

func GetClusterClaimInfo

func GetClusterClaimInfo(managedCluster *clusterv1.ManagedCluster) (string, int64, string)

GetClusterClaimInfo return the ManagedCluster vendor, version and ID

Types

type Monitor

type Monitor struct {
	ManagedClusterInfo  []types.ManagedClusterInfo
	ClusterNeedsCCX     map[string]bool
	ClusterPollInterval time.Duration // How often we want to update managed cluster list
}

Monitor struct

func NewClusterMonitor

func NewClusterMonitor() *Monitor

NewClusterMonitor ...

func (*Monitor) AddLocalCluster

func (m *Monitor) AddLocalCluster(versionObj *unstructured.Unstructured) bool

AddLocalCluster - adds local cluster to Clusters list

func (*Monitor) GetLocalCluster

func (m *Monitor) GetLocalCluster() string

GetLocalCluster - GET ID from Clusters list

func (*Monitor) GetManagedClusterInfo

func (m *Monitor) GetManagedClusterInfo() []types.ManagedClusterInfo

Getter for ManagedClusterInfo

func (*Monitor) WatchClusters

func (m *Monitor) WatchClusters()

WatchClusters - Watches ManagedCluster objects and updates clusterID list for Insights call.

Jump to

Keyboard shortcuts

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