service

package
v0.0.0-...-5d3e5e5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelSelectorListOptionsForService

func GetLabelSelectorListOptionsForService() metav1.ListOptions

*

GetLabelSelectorListOptionsForService
Fetch the global label seletor key value pair form the enviornment
Supply the LabelSelector to service List options

*

Types

type ContainerInfo

type ContainerInfo struct {
	Name   string `json:"name"`
	Image  string `json:"image"`
	Status bool   `json:"status"`
}

Describe the basic information related to Container

type IngressServiceMap

type IngressServiceMap struct {
	Metadata     ingress.Metadata `json:"metadata"`
	Routes       ingress.Paths    `json:"spec"`
	Status       ingress.Status   `json:"status"`
	IngressClass string           `json:"ingressClass"`
}

type PodInfo

type PodInfo struct {
	Name       string          `json:"name"`
	Status     string          `json:"status"`
	Reason     string          `json:"reason"`
	IsReady    bool            `json:"isReady"`
	Containers []ContainerInfo `json:"containers"`
}

Describe the basic information related to Pod

type Ports

type Ports struct {
	Name       string `json:"name"`
	Protocol   string `json:"protocol"`
	Port       int    `json:"port"`
	TargetPort string `json:"targetPort"`
}

PORT Info associated with the service

type Resource

type Resource interface {
	ListServices(namespace *string, clusterScopr bool) (*[]ServiceDto, error)
	ListServiceMappings(namespace *string, service *string) (*[]IngressServiceMap, error)
}

func New

func New(client *client.Clientset) Resource

type ServiceDto

type ServiceDto struct {
	// Name of the service
	Name string `json:"name"`

	// Namespace where service is created
	Namespace string `json:"namespace"`

	// Time when the service was created
	CreationTimestamp time.Time `json:"creationTimestamp"`

	// List of all labels associated with the service
	Labels map[string]string `json:"labels"`

	// List of all annotations associated with the service
	Annotations map[string]string `json:"annotations"`

	// Label selector of the service.
	Selector map[string]string `json:"selector"`

	// ClusterIP is usually assigned by the master. Valid values are None, empty string (""), or
	// a valid IP address. None can be specified for headless services when proxying is not required
	ClusterIP string `json:"clusterIP"`

	// ExternalIP is the Ip of the Loadbalancer attached with the service
	// If service type is not Loadbalaner then IP will be none
	ExternalIP string `json:"externalIP"`

	// Type determines how the service will be exposed.  Valid options: ClusterIP, NodePort, LoadBalancer, ExternalName
	Type string `json:"type"`

	// Ports mapped to the service
	Ports []Ports `json:"ports"`

	// Pod Instances
	Pods []PodInfo `json:"podInfo"`

	// Success statsus, check if any one pod is available to pass request
	State string `json:"state"`
}

type ServiceListChannel

type ServiceListChannel struct {
	List  chan *v1.ServiceList
	Error chan error
}

func GetServiceListChannel

func GetServiceListChannel(client client.Interface, namespace *string, clusterScope bool) ServiceListChannel

*

GetServiceListChannel
Routine return servicelist channel to fetch services based on configured labels

*

type ServiceType

type ServiceType string

Jump to

Keyboard shortcuts

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