Documentation ¶
Index ¶
Constants ¶
const ( // ContainerIndex marker for stored containers. ContainerIndex string = "co" )
const ( // NodeIndex marker for stored nodes. NodeIndex string = "no" )
const ( // NodeMXIndex track store indexer. NodeMXIndex string = "nmx" )
const ( // PodIndex marker for stored pods. PodIndex string = "po" )
const ( // PodMXIndex track store indexer. PodMXIndex string = "pmx" )
Variables ¶
This section is empty.
Functions ¶
func MetaFQN ¶
func MetaFQN(m metav1.ObjectMeta) string
MetaFQN computes unique resource id based on metadata.
Types ¶
type Connection ¶
type Connection k8s.Connection
Connection represents an client api server connection.
type Container ¶
type Container struct {
StoreInformer
}
Container tracks container activities.
func NewContainer ¶
func NewContainer(po StoreInformer) *Container
NewContainer returns a new container.
func (*Container) Get ¶
func (c *Container) Get(fqn string, opts metav1.GetOptions) (interface{}, error)
Get retrieves a given container from store.
func (*Container) List ¶
func (c *Container) List(fqn string, opts metav1.ListOptions) k8s.Collection
List retrieves alist of containers for a given po from store.
func (*Container) Run ¶
func (c *Container) Run(closeCh <-chan struct{})
Run starts out the informer loop.
func (*Container) StartWatching ¶
func (c *Container) StartWatching(stopCh <-chan struct{})
StartWatching registers container event listener.
type Informer ¶
type Informer struct {
// contains filtered or unexported fields
}
Informer represents a collection of cluster wide watchers.
func NewInformer ¶
func NewInformer(client k8s.Connection, ns string) (*Informer, error)
NewInformer creates a new cluster resource informer
func (*Informer) Get ¶
func (i *Informer) Get(res, fqn string, opts metav1.GetOptions) (interface{}, error)
Get a resource by name.
func (*Informer) List ¶
func (i *Informer) List(res, ns string, opts metav1.ListOptions) (k8s.Collection, error)
List items from store.
type Node ¶
type Node struct {
}Node tracks node activities.
func (*Node) Get ¶
func (n *Node) Get(fqn string, opts metav1.GetOptions) (interface{}, error)
Get retrieves a given node from store.
func (*Node) List ¶
func (n *Node) List(_ string, opts metav1.ListOptions) k8s.Collection
List all nodes.
type NodeMetrics ¶
type NodeMetrics struct { // contains filtered or unexported fields }
NodeMetrics tracks node metrics.
func NewNodeMetrics ¶
func NewNodeMetrics(c k8s.Connection) *NodeMetrics
NewNodeMetrics returns a node metrics informer.
func (*NodeMetrics) Get ¶
func (p *NodeMetrics) Get(MetaFQN string, opts metav1.GetOptions) (interface{}, error)
Get node metrics from store.
func (*NodeMetrics) List ¶
func (p *NodeMetrics) List(_ string, opts metav1.ListOptions) k8s.Collection
List node metrics from store.
type Pod ¶
type Pod struct {
}Pod tracks pod activities.
func (*Pod) Get ¶
func (p *Pod) Get(fqn string, opts metav1.GetOptions) (interface{}, error)
Get retrieves a given pod from store.
func (*Pod) List ¶
func (p *Pod) List(ns string, opts metav1.ListOptions) k8s.Collection
List all pods from store in the given namespace.
type PodMetrics ¶
type PodMetrics struct { // contains filtered or unexported fields }
PodMetrics tracks pod metrics.
func NewPodMetrics ¶
func NewPodMetrics(c k8s.Connection, ns string) *PodMetrics
NewPodMetrics returns a pod metrics informer.
func (*PodMetrics) Get ¶
func (p *PodMetrics) Get(fqn string, opts metav1.GetOptions) (interface{}, error)
Get pod metrics from store.
func (*PodMetrics) List ¶
func (p *PodMetrics) List(ns string, opts metav1.ListOptions) k8s.Collection
List pod metrics from store.
type RowEvent ¶
RowEvent represents a call for action after a resource reconciliation. Tracks whether a resource got added, deleted or updated.
type StoreInformer ¶
type StoreInformer interface { cache.SharedIndexInformer Get(fqn string, opts metav1.GetOptions) (interface{}, error) List(ns string, opts metav1.ListOptions) k8s.Collection }
StoreInformer an informer that allows listeners registration.
type TableListenerFn ¶
type TableListenerFn func(TableData)
TableListenerFn represents a table data listener.