Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterMonitor ¶
type ClusterMonitor struct {
// contains filtered or unexported fields
}
ClusterMonitor monitors the state of the cluster and if necessary, evaluates namespace last activity to determine which namespaces should be archived. field of type StringSet (returned by sets.NewString) populate that in clustermonitor structor based on config.ProtectedNamespaces
func NewClusterMonitor ¶
func NewClusterMonitor(archivistConfig config.ArchivistConfig, clusterConfig config.ClusterConfig, bc buildclient.Interface, kc kubernetes.Interface, arkClient arkclientset.Interface) *ClusterMonitor
func (*ClusterMonitor) GetLastActivity ¶
func (a *ClusterMonitor) GetLastActivity(namespace string) (time.Time, error)
GetLastActivity returns the last activity time for a namespace by examining its builds and replication controllers. If no builds or replication controllers are found we return nil. If the namespace does not exist, we return an error.
func (*ClusterMonitor) Run ¶
func (a *ClusterMonitor) Run()
type LastActivitySorter ¶
type LastActivitySorter []LastActivity
func (LastActivitySorter) Len ¶
func (a LastActivitySorter) Len() int
func (LastActivitySorter) Less ¶
func (a LastActivitySorter) Less(i, j int) bool
func (LastActivitySorter) Swap ¶
func (a LastActivitySorter) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.