clustermonitor

package
v0.0.0-...-20c57e2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

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 LastActivity

type LastActivity struct {
	Namespace *kapiv1.Namespace
	Time      time.Time
}

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)

Jump to

Keyboard shortcuts

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