kubernetes

package
v1.20.11 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NSKubeSystem namespace for kubernetes service,
	// event from this namespace shoud be ignored
	NSKubeSystem = "kube-system"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(config string, handler cache.ResourceEventHandler, syncPeriod time.Duration) (svcclient.Client, error)

NewClient create internal service client

Types

type KubeManager

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

KubeManager manage kubernetes Service/Pod info AppService discovery

func (*KubeManager) Close

func (m *KubeManager) Close()

Close client, clean resource

func (*KubeManager) GetAppService

func (m *KubeManager) GetAppService(namespace, name string) (*svcclient.AppService, error)

GetAppService get service by specified name

func (*KubeManager) ListAppService

func (m *KubeManager) ListAppService(labels map[string]string) ([]*svcclient.AppService, error)

ListAppService list all service in cache TODO: list all AppService from AppService cache

func (*KubeManager) ListAppServiceFromStatefulSet

func (m *KubeManager) ListAppServiceFromStatefulSet(ns, name string) ([]*svcclient.AppService, error)

ListAppServiceFromStatefulSet list app service from stateful set by service name generate a AppService object for each statefulset pod

Jump to

Keyboard shortcuts

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