pod

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

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

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

Documentation

Overview

Package pod cache kubernetes pod in memory and db It handle local scheduler pod host ip info. It will provides query pod list by app

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewListWatchPodFromClient

func NewListWatchPodFromClient(c cache.Getter) *cache.ListWatch

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

Types

type AbnormalInfo

type AbnormalInfo struct {
	ServiceID     string    `json:"service_id"`
	ServiceAlias  string    `json:"service_alias"`
	PodName       string    `json:"pod_name"`
	ContainerName string    `json:"container_name"`
	Reason        string    `json:"reson"`
	Message       string    `json:"message"`
	CreateTime    time.Time `json:"create_time"`
	Count         int       `json:"count"`
}

AbnormalInfo pod Abnormal info Record the container exception exit information in pod.

func (AbnormalInfo) Hash

func (a AbnormalInfo) Hash() string

Hash get AbnormalInfo hash

func (AbnormalInfo) String

func (a AbnormalInfo) String() string

type CacheManager

type CacheManager struct {
	// contains filtered or unexported fields
}

CacheManager pod cache manager

func NewCacheManager

func NewCacheManager(kubeclient *kubernetes.Clientset) *CacheManager

NewCacheManager create pod cache manager and start it

func (*CacheManager) RemoveWatch

func (c *CacheManager) RemoveWatch(w *cacheWatch)

RemoveWatch remove watch

func (*CacheManager) Start

func (c *CacheManager) Start()

Start start watch pod event

func (*CacheManager) Stop

func (c *CacheManager) Stop()

Stop stop

func (*CacheManager) Watch

func (c *CacheManager) Watch(labelSelector string) watch.Interface

Watch pod cache watch

Jump to

Keyboard shortcuts

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