status

package
v3.7.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package status check app status from kubernetes rc,statefulset and deployment It save app status to db and provides query

Index

Constants

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

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.

Types

type Manager

type Manager struct {
	StatefulSetUpdateChan chan source.StatefulSetUpdate
	RCUpdateChan          chan source.RCUpdate
	DeploymentUpdateChan  chan source.DeploymentUpdate

	ClientSet *kubernetes.Clientset
	// contains filtered or unexported fields
}

Manager app status manager

func NewManager

func NewManager(ctx context.Context, clientset *kubernetes.Clientset) *Manager

NewManager create app runtime status manager

func (*Manager) CheckStatus

func (s *Manager) CheckStatus(serviceID string)

CheckStatus check app status

func (*Manager) GetAllStatus

func (s *Manager) GetAllStatus() map[string]string

GetAllStatus get all app status

func (*Manager) GetStatus

func (s *Manager) GetStatus(serviceID string) string

GetStatus get app status

func (*Manager) IgnoreDelete

func (s *Manager) IgnoreDelete(name string)

IgnoreDelete add ignore delete info

func (*Manager) RmIgnoreDelete

func (s *Manager) RmIgnoreDelete(name string)

RmIgnoreDelete remove ignore delete info

func (*Manager) SaveDeployInfo

func (s *Manager) SaveDeployInfo(serviceID, tenantID, deployVersion, replicationID, replicationType string) (*model.K8sDeployReplication, error)

SaveDeployInfo save app deploy info

func (*Manager) SetStatus

func (s *Manager) SetStatus(serviceID, status string) error

SetStatus set app status

func (*Manager) Start

func (s *Manager) Start() error

Start start

func (*Manager) SyncStatus

func (s *Manager) SyncStatus()

SyncStatus sync app status

Jump to

Keyboard shortcuts

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