watcher

package
v0.0.0-...-e46eeea Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Storage

func Storage(self v1.ResourceList) *resource.Quantity

func WatchDeployments

func WatchDeployments(socket infra.Socket, mutex *sync.Mutex, namespace string)

WatchDeployments ...

func WatchEvents

func WatchEvents(socket infra.Socket, mutex *sync.Mutex)

WatchEvents ...

func WatchNodes

func WatchNodes(socket infra.Socket, mutex *sync.Mutex)

WatchNodes ...

func WatchPodMetrics

func WatchPodMetrics(socket infra.Socket, mutex *sync.Mutex)

WatchPodMetrics ...

func WatchPods

func WatchPods(socket infra.Socket, mutex *sync.Mutex)

WatchPods ...

func WatchServices

func WatchServices(socket infra.Socket, mutex *sync.Mutex, namespace string)

WatchServices ...

func WriteMeta

func WriteMeta(resource string, socket infra.Socket, mutex *sync.Mutex)

WriteMeta ...

Types

type AppMeta

type AppMeta struct {
	Resource string `json:"resource,omitempty"`
}

type Deployment

type Deployment struct {
	Meta `json:"meta,omitempty"`
	Pods []string `json:"pods,omitempty"`
}

type Event

type Event struct {
	Reason             string `json:"reason,omitempty"`
	InvolvedObjectName string `json:"involved_object_name,omitempty"`
}

type Meta

type Meta struct {
	ID        string            `json:"id,omitempty"`
	Name      string            `json:"name,omitempty"`
	Namespace string            `json:"namespace,omitempty"`
	Labels    map[string]string `json:"labels,omitempty"`
	Created   metav1.Time       `json:"created,omitempty"`
}

type Node

type Node struct {
	Name        string  `json:"name,omitempty"`
	CPU         float64 `json:"cpu"`
	Memory      float64 `json:"memory"`
	ReadyStatus bool    `json:"readyStatus"`
}

type Payload

type Payload struct {
	Resource interface{} `json:"resource,omitempty"`
	Action   string      `json:"action,omitempty"`
}

type Pod

type Pod struct {
	Meta    `json:"meta,omitempty"`
	Status  v1.PodStatus `json:"status,omitempty"`
	Request Resources    `json:"request,omitempty"`
	Limit   Resources    `json:"limit,omitempty"`
	Usage   Resources    `json:"usage,omitempty"`
	Service string       `json:"service,omitempty"`
	Node    string       `json:"node,omitempty"`
}

type PodMetrics

type PodMetrics struct {
	Pod    string  `json:"pod,omitempty"`
	CPU    float64 `json:"cpu"`
	Memory float64 `json:"memory"`
	Error  string  `json:"error,omitempty"`
}

type Resources

type Resources struct {
	CPU    float64 `json:"cpu"`
	Memory float64 `json:"memory"`
}

type Service

type Service struct {
	Meta     `json:"meta,omitempty"`
	Selector map[string]string `json:"selector,omitempty"`
	Pods     []string          `json:"pods,omitempty"`
	IP       string            `json:"ip,omitempty"`
}

Jump to

Keyboard shortcuts

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