status

package
v3.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING  string = "running"
	CLOSED          = "closed"
	STARTING        = "starting"
	STOPPING        = "stopping"
	CHECKING        = "checking"
	//运行异常
	ABNORMAL = "abnormal"
	//升级中
	UPGRADE  = "upgrade"
	UNDEPLOY = "undeploy"
)

These are the available operation types.

Variables

This section is empty.

Functions

func GetPodCondition

func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func IsPodReady

func IsPodReady(pod *v1.Pod) bool

IsPodReady returns true if a pod is ready; false otherwise.

func IsPodReadyConditionTrue

func IsPodReadyConditionTrue(status v1.PodStatus) bool

IsPodReadyConditionTrue retruns true if a pod is ready; false otherwise.

func NewDeploymentsController

func NewDeploymentsController(lw cache.ListerWatcher, period time.Duration, ch chan<- DeploymentUpdate) cache.Controller

NewDeploymentsController creates a controller that is watching deployments and sending updates into deployments channel.

func NewListWatchFromClient

func NewListWatchFromClient(c cache.Getter, resource string, namespace string, fieldSelector fields.Selector) *cache.ListWatch

NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.

func NewRCController

func NewRCController(lw cache.ListerWatcher, period time.Duration, ch chan<- RCUpdate) cache.Controller

NewRCController creates a controller that is watching rc and sending updates into ServiceUpdate channel.

func NewSourceAPI

func NewSourceAPI(v1get cache.Getter, batev1 cache.Getter, period time.Duration, rcsChan chan<- RCUpdate, deploymentsChan chan<- DeploymentUpdate, statefulChan chan<- StatefulSetUpdate, stopCh <-chan struct{})

NewSourceAPI creates config source that watches for changes to the services and pods.

func NewStatefulSetsController

func NewStatefulSetsController(lw cache.ListerWatcher, period time.Duration, ch chan<- StatefulSetUpdate) cache.Controller

NewStatefulSetsController creates a controller that is watching statefulset and sending updates into deployments channel.

Types

type DeploymentUpdate

type DeploymentUpdate struct {
	Deployment *v1beta1.Deployment
	Op         Operation
}

DeploymentUpdate describes an operation of deployment, sent on the channel. You can add, update or remove single endpoints by setting Op == ADD|UPDATE|REMOVE.

type Operation

type Operation int

Operation is a type of operation of services or endpoints.

const (
	ADD Operation = iota
	UPDATE
	REMOVE
	SYNCED
)

These are the available operation types.

type RCUpdate

type RCUpdate struct {
	RC *v1.ReplicationController
	Op Operation
}

RCUpdate describes an operation of endpoints, sent on the channel. You can add, update or remove single endpoints by setting Op == ADD|UPDATE|REMOVE.

type ServiceStatusManager

type ServiceStatusManager interface {
	SetStatus(serviceID, status string) error
	GetStatus(serviceID string) (string, error)
	CheckStatus(serviceID string)
	Start() error
	Stop() error
	SyncStatus()
	IgnoreDelete(name string)
	RmIgnoreDelete(name string)
}

ServiceStatusManager 应用运行状态控制器

func NewManager

func NewManager(conf option.Config) ServiceStatusManager

NewManager 创建一个应用运行状态控制器

type StatefulSetUpdate

type StatefulSetUpdate struct {
	StatefulSet *v1beta1.StatefulSet
	Op          Operation
}

StatefulSetUpdate describes an operation of endpoints, sent on the channel. You can add, update or remove single endpoints by setting Op == ADD|UPDATE|REMOVE.

Jump to

Keyboard shortcuts

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