Documentation ¶
Index ¶
- type DeploymentEventHandler
- type DeploymentInfo
- type K8sResourceManager
- func (manager *K8sResourceManager) DeploymentAdded(deployment *DeploymentInfo)
- func (manager *K8sResourceManager) DeploymentDeleted(deployment *DeploymentInfo)
- func (manager *K8sResourceManager) DeploymentUpdated(oldDeployment, newDeployment *DeploymentInfo)
- func (manager *K8sResourceManager) DeploymentValid(deployment *DeploymentInfo) bool
- func (manager *K8sResourceManager) GetK8sIP() string
- func (manager *K8sResourceManager) GetMatchedResources(resource ResourceInfoPointer, matchType ResourceType) []ResourceInfoPointer
- func (manager *K8sResourceManager) GetPodDeployment(pod *PodInfo) *DeploymentInfo
- func (manager *K8sResourceManager) GetPodFromIp(ip string) *PodInfo
- func (manager *K8sResourceManager) GetPodIpInThisNode() string
- func (manager *K8sResourceManager) GetPodsForService(service *ServiceInfo) []*PodInfo
- func (manager *K8sResourceManager) GetServiceFromClusterIp(ip string) *ServiceInfo
- func (manager *K8sResourceManager) IsLocked() bool
- func (manager *K8sResourceManager) Lock()
- func (manager *K8sResourceManager) NewCond() *sync.Cond
- func (manager *K8sResourceManager) PodAdded(info *PodInfo)
- func (manager *K8sResourceManager) PodDeleted(info *PodInfo)
- func (manager *K8sResourceManager) PodUpdated(oldPod, newPod *PodInfo)
- func (manager *K8sResourceManager) PodValid(info *PodInfo) bool
- func (manager *K8sResourceManager) ServiceAdded(info *ServiceInfo)
- func (manager *K8sResourceManager) ServiceDeleted(info *ServiceInfo)
- func (manager *K8sResourceManager) ServiceUpdated(oldService, newService *ServiceInfo)
- func (manager *K8sResourceManager) ServiceValid(info *ServiceInfo) bool
- func (manager *K8sResourceManager) Unlock()
- func (manager *K8sResourceManager) WatchDaemonSets(stopper chan struct{}, handlers ...DeploymentEventHandler)
- func (manager *K8sResourceManager) WatchDeployments(stopper chan struct{}, handlers ...DeploymentEventHandler)
- func (manager *K8sResourceManager) WatchPods(stopper chan struct{}, handlers ...PodEventHandler)
- func (manager *K8sResourceManager) WatchServices(stopper chan struct{}, handlers ...ServiceEventHandler)
- func (manager *K8sResourceManager) WatchStatefulSets(stopper chan struct{}, handlers ...DeploymentEventHandler)
- type PodEventHandler
- type PodInfo
- type ResourceInfoPointer
- type ResourceType
- type ResourcesOnLabel
- type ServiceEventHandler
- type ServiceInfo
- type ServicePortInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentEventHandler ¶
type DeploymentEventHandler interface { DeploymentValid(deployment *DeploymentInfo) bool DeploymentAdded(deployment *DeploymentInfo) DeploymentDeleted(deployment *DeploymentInfo) DeploymentUpdated(oldDeployment, newDeployment *DeploymentInfo) }
type DeploymentInfo ¶
type DeploymentInfo struct { Labels map[string]string Ports []uint32 HostNetwork bool // contains filtered or unexported fields }
func NewDeploymentInfo ¶
func NewDeploymentInfo(obj interface{}) *DeploymentInfo
func (*DeploymentInfo) GetSelector ¶
func (deployment *DeploymentInfo) GetSelector() map[string]string
func (*DeploymentInfo) Name ¶
func (deployment *DeploymentInfo) Name() string
func (*DeploymentInfo) Namespace ¶
func (deployment *DeploymentInfo) Namespace() string
func (*DeploymentInfo) String ¶
func (deployment *DeploymentInfo) String() string
func (*DeploymentInfo) Type ¶
func (deployment *DeploymentInfo) Type() ResourceType
type K8sResourceManager ¶
type K8sResourceManager struct {
// contains filtered or unexported fields
}
func NewK8sResourceManager ¶
func NewK8sResourceManager() (*K8sResourceManager, error)
func (*K8sResourceManager) DeploymentAdded ¶
func (manager *K8sResourceManager) DeploymentAdded(deployment *DeploymentInfo)
func (*K8sResourceManager) DeploymentDeleted ¶
func (manager *K8sResourceManager) DeploymentDeleted(deployment *DeploymentInfo)
func (*K8sResourceManager) DeploymentUpdated ¶
func (manager *K8sResourceManager) DeploymentUpdated(oldDeployment, newDeployment *DeploymentInfo)
func (*K8sResourceManager) DeploymentValid ¶
func (manager *K8sResourceManager) DeploymentValid(deployment *DeploymentInfo) bool
func (*K8sResourceManager) GetK8sIP ¶
func (manager *K8sResourceManager) GetK8sIP() string
func (*K8sResourceManager) GetMatchedResources ¶
func (manager *K8sResourceManager) GetMatchedResources(resource ResourceInfoPointer, matchType ResourceType) []ResourceInfoPointer
func (*K8sResourceManager) GetPodDeployment ¶
func (manager *K8sResourceManager) GetPodDeployment(pod *PodInfo) *DeploymentInfo
func (*K8sResourceManager) GetPodFromIp ¶
func (manager *K8sResourceManager) GetPodFromIp(ip string) *PodInfo
func (*K8sResourceManager) GetPodIpInThisNode ¶
func (manager *K8sResourceManager) GetPodIpInThisNode() string
func (*K8sResourceManager) GetPodsForService ¶
func (manager *K8sResourceManager) GetPodsForService(service *ServiceInfo) []*PodInfo
func (*K8sResourceManager) GetServiceFromClusterIp ¶
func (manager *K8sResourceManager) GetServiceFromClusterIp(ip string) *ServiceInfo
func (*K8sResourceManager) IsLocked ¶
func (manager *K8sResourceManager) IsLocked() bool
func (*K8sResourceManager) Lock ¶
func (manager *K8sResourceManager) Lock()
func (*K8sResourceManager) NewCond ¶
func (manager *K8sResourceManager) NewCond() *sync.Cond
func (*K8sResourceManager) PodAdded ¶
func (manager *K8sResourceManager) PodAdded(info *PodInfo)
func (*K8sResourceManager) PodDeleted ¶
func (manager *K8sResourceManager) PodDeleted(info *PodInfo)
func (*K8sResourceManager) PodUpdated ¶
func (manager *K8sResourceManager) PodUpdated(oldPod, newPod *PodInfo)
func (*K8sResourceManager) PodValid ¶
func (manager *K8sResourceManager) PodValid(info *PodInfo) bool
func (*K8sResourceManager) ServiceAdded ¶
func (manager *K8sResourceManager) ServiceAdded(info *ServiceInfo)
func (*K8sResourceManager) ServiceDeleted ¶
func (manager *K8sResourceManager) ServiceDeleted(info *ServiceInfo)
func (*K8sResourceManager) ServiceUpdated ¶
func (manager *K8sResourceManager) ServiceUpdated(oldService, newService *ServiceInfo)
func (*K8sResourceManager) ServiceValid ¶
func (manager *K8sResourceManager) ServiceValid(info *ServiceInfo) bool
func (*K8sResourceManager) Unlock ¶
func (manager *K8sResourceManager) Unlock()
func (*K8sResourceManager) WatchDaemonSets ¶
func (manager *K8sResourceManager) WatchDaemonSets(stopper chan struct{}, handlers ...DeploymentEventHandler)
func (*K8sResourceManager) WatchDeployments ¶
func (manager *K8sResourceManager) WatchDeployments(stopper chan struct{}, handlers ...DeploymentEventHandler)
func (*K8sResourceManager) WatchPods ¶
func (manager *K8sResourceManager) WatchPods(stopper chan struct{}, handlers ...PodEventHandler)
func (*K8sResourceManager) WatchServices ¶
func (manager *K8sResourceManager) WatchServices(stopper chan struct{}, handlers ...ServiceEventHandler)
func (*K8sResourceManager) WatchStatefulSets ¶
func (manager *K8sResourceManager) WatchStatefulSets(stopper chan struct{}, handlers ...DeploymentEventHandler)
type PodEventHandler ¶
type PodInfo ¶
type PodInfo struct { ResourceVersion string PodIP string HostIP string HostNetwork bool Labels map[string]string // contains filtered or unexported fields }
func NewPodInfo ¶
func (*PodInfo) GetSelector ¶
func (*PodInfo) Type ¶
func (pod *PodInfo) Type() ResourceType
type ResourceInfoPointer ¶
type ResourceType ¶
type ResourceType int
const ( SERVICE_TYPE ResourceType = 1 DEPLOYMENT_TYPE ResourceType = 2 POD_TYPE ResourceType = 3 )
func (ResourceType) String ¶
func (e ResourceType) String() string
type ResourcesOnLabel ¶
type ResourcesOnLabel map[ResourceType][]ResourceInfoPointer
type ServiceEventHandler ¶
type ServiceEventHandler interface { ServiceValid(info *ServiceInfo) bool ServiceAdded(svc *ServiceInfo) ServiceDeleted(svc *ServiceInfo) ServiceUpdated(oldService, newService *ServiceInfo) }
type ServiceInfo ¶
type ServiceInfo struct { ResourceVersion string ClusterIP string Ports []*ServicePortInfo // contains filtered or unexported fields }
func NewServiceInfo ¶
func NewServiceInfo(service *v1.Service) *ServiceInfo
func (*ServiceInfo) GetSelector ¶
func (service *ServiceInfo) GetSelector() map[string]string
func (*ServiceInfo) IsKubeAPIService ¶
func (service *ServiceInfo) IsKubeAPIService() bool
func (*ServiceInfo) Name ¶
func (service *ServiceInfo) Name() string
func (*ServiceInfo) Namespace ¶
func (service *ServiceInfo) Namespace() string
func (*ServiceInfo) String ¶
func (service *ServiceInfo) String() string
func (*ServiceInfo) Type ¶
func (service *ServiceInfo) Type() ResourceType
type ServicePortInfo ¶
Click to show internal directories.
Click to hide internal directories.