Documentation ¶
Overview ¶
Package state contains information about the state of Nomos on a cluster.
Index ¶
Constants ¶
const MonitorName = "monitor"
MonitorName is the name of the monitor Deployment.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterState ¶
type ClusterState struct {
// contains filtered or unexported fields
}
ClusterState maintains the status of imports and syncs at the cluster level and exports them as Prometheus metrics.
func NewClusterState ¶
func NewClusterState() *ClusterState
NewClusterState returns a new ClusterState.
func (*ClusterState) DeleteConfig ¶
func (c *ClusterState) DeleteConfig(name string)
DeleteConfig removes the ClusterConfig or NamespaceConfig with the given name if it is present.
func (*ClusterState) ProcessClusterConfig ¶
func (c *ClusterState) ProcessClusterConfig(cp *v1.ClusterConfig) error
ProcessClusterConfig updates the ClusterState with the current status of the ClusterConfig.
func (*ClusterState) ProcessNamespaceConfig ¶
func (c *ClusterState) ProcessNamespaceConfig(pn *v1.NamespaceConfig) error
ProcessNamespaceConfig updates the ClusterState with the current status of the NamespaceConfig.
func (*ClusterState) ProcessRepo ¶
func (c *ClusterState) ProcessRepo(repo *v1.Repo)
ProcessRepo updates the ClusterState with the current number of errors in the Repo.