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

Source Files