discovery

package
v0.0.0-...-cb67029 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pod

type Pod struct {
	HostIP string            `json:"hostIp"`
	PodIP  string            `json:"podIp"`
	Labels map[string]string `json:"labels"`
	Name   string            `json:"name"`
}

Pod represents the basic information about a k8s Pod.

func GetPodList

func GetPodList(pods *v1.PodList) []Pod

GetPodList maps a k8s PodList to an array of Pods.

type Selector

type Selector map[string]string

Selector specifies a list of key,value pairs.

type Service

type Service struct {
	Name      string           `json:"name"`
	ClusterIP string           `json:"clusterIp"`
	Ports     []v1.ServicePort `json:"ports"`
	PodList   []Pod            `json:"podList"`
	Balancer  string           `json:"balancer"`
}

Service represents the list of properties of services both from spec and last seen status.

func Locate

func Locate(cli kubernetes.Interface, s Selector, ns string, exact bool) ([]Service, error)

Locate locates a service based on input selectors which are a list of key,value pairs that needs to match.

Jump to

Keyboard shortcuts

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