Documentation ¶
Index ¶
- Variables
- func InitLogger(writer io.Writer, logLevel string)
- func PrintCheckHeader()
- func PrintCheckResults(ch *Checker)
- func PrintHost(t *Target)
- func PrintIngressPath(i *IngressPath, indent int)
- func PrintPodPort(p *PodPort, indent int)
- func PrintServicePort(s *ServicePort, indent int)
- type Check
- type Checker
- func (ch *Checker) CheckKubernetesRouteFromHost()
- func (ch *Checker) CheckListeningPod()
- func (ch *Checker) CheckStatusPod()
- func (ch *Checker) FailCheck()
- func (ch *Checker) InitChecks()
- func (ch *Checker) ParseTarget(path string) (err error)
- func (ch *Checker) PassCheck()
- func (ch *Checker) RunChecks()
- type Client
- func (c *Client) GetComponents() (components *KubernetesComponents)
- func (c *Client) GetIngresses() (apiIngresses *v1beta1.IngressList)
- func (c *Client) GetPods() (apiPods *v1.PodList)
- func (c *Client) GetServices() (apiServices *v1.ServiceList)
- func (c *Client) IsPodListening(p *PodPort) (result bool)
- type IngressPath
- type KubernetesComponents
- func (co *KubernetesComponents) FindIngressPathForHost(t *Target) (ingressPath *IngressPath, err error)
- func (co *KubernetesComponents) FindIngressPathForServicePort(s *ServicePort) (ingressPath *IngressPath, err error)
- func (co *KubernetesComponents) FindPodPort(n string) (podPort *PodPort, err error)
- func (co *KubernetesComponents) FindPodPortForServicePort(s *ServicePort) (podPorts []*PodPort, err error)
- func (co *KubernetesComponents) FindServicePortForHost(t *Target) (servicePort *ServicePort, err error)
- func (co *KubernetesComponents) FindServicePortForIngressPath(i *IngressPath) (servicePort *ServicePort, err error)
- func (co *KubernetesComponents) FindServicePortForPodPort(p *PodPort) (servicePort *ServicePort, err error)
- type KubernetesRoute
- type PodPort
- type ServicePort
- type Target
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger log.Logger
Functions ¶
func InitLogger ¶
InitJsonLogger function initiates a structured JSON logger, taking in the specified log level for what is displayed at runtime.
func PrintCheckHeader ¶
func PrintCheckHeader()
func PrintCheckResults ¶
func PrintCheckResults(ch *Checker)
func PrintIngressPath ¶
func PrintIngressPath(i *IngressPath, indent int)
func PrintPodPort ¶
func PrintServicePort ¶
func PrintServicePort(s *ServicePort, indent int)
Types ¶
type Checker ¶
type Checker struct { Target *Target KubernetesRoute *KubernetesRoute KubernetesComponents *KubernetesComponents Client Client RequiredChecks []string PassedChecks []string FailedChecks []string }
func (*Checker) CheckKubernetesRouteFromHost ¶
func (ch *Checker) CheckKubernetesRouteFromHost()
func (*Checker) CheckListeningPod ¶
func (ch *Checker) CheckListeningPod()
func (*Checker) CheckStatusPod ¶
func (ch *Checker) CheckStatusPod()
func (*Checker) InitChecks ¶
func (ch *Checker) InitChecks()
func (*Checker) ParseTarget ¶
type Client ¶
type Client struct { *kubernetes.Clientset Config *rest.Config }
func InitClient ¶
func (*Client) GetComponents ¶
func (c *Client) GetComponents() (components *KubernetesComponents)
func (*Client) GetIngresses ¶
func (c *Client) GetIngresses() (apiIngresses *v1beta1.IngressList)
func (*Client) GetServices ¶
func (c *Client) GetServices() (apiServices *v1.ServiceList)
func (*Client) IsPodListening ¶
type IngressPath ¶
type IngressPath struct { Host string `json:"host,omitempty"` IpAddress net.IP `json:"ipAddress,omitempty"` Namespace string `json:"namespace,omitempty"` IngressName string `json:"name,omitempty"` Path string `json:"path,omitempty"` ServiceName string `json:"serviceName,omitempty"` ServiceIntPort int32 `json:"servicePort,omitempty"` ServiceStrPort string `json:"servicePort,omitempty"` Service []*ServicePort }
func IngressesToIngressPaths ¶
func IngressesToIngressPaths(apiIngresses *v1beta1.IngressList) (ingressPaths []*IngressPath)
type KubernetesComponents ¶
type KubernetesComponents struct { IngressPaths []*IngressPath ServicePorts []*ServicePort PodPorts []*PodPort }
func (*KubernetesComponents) FindIngressPathForHost ¶
func (co *KubernetesComponents) FindIngressPathForHost(t *Target) (ingressPath *IngressPath, err error)
func (*KubernetesComponents) FindIngressPathForServicePort ¶
func (co *KubernetesComponents) FindIngressPathForServicePort(s *ServicePort) (ingressPath *IngressPath, err error)
func (*KubernetesComponents) FindPodPort ¶
func (co *KubernetesComponents) FindPodPort(n string) (podPort *PodPort, err error)
func (*KubernetesComponents) FindPodPortForServicePort ¶
func (co *KubernetesComponents) FindPodPortForServicePort(s *ServicePort) (podPorts []*PodPort, err error)
func (*KubernetesComponents) FindServicePortForHost ¶
func (co *KubernetesComponents) FindServicePortForHost(t *Target) (servicePort *ServicePort, err error)
func (*KubernetesComponents) FindServicePortForIngressPath ¶
func (co *KubernetesComponents) FindServicePortForIngressPath(i *IngressPath) (servicePort *ServicePort, err error)
func (*KubernetesComponents) FindServicePortForPodPort ¶
func (co *KubernetesComponents) FindServicePortForPodPort(p *PodPort) (servicePort *ServicePort, err error)
type KubernetesRoute ¶
type KubernetesRoute struct { Ingress *IngressPath Service *ServicePort Pods []*PodPort }
type PodPort ¶
type PodPort struct { PodName string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` App string ContainerImage string `json:"image,omitempty"` ContainerName string `json:"name,omitempty"` PortName string `json:"name,omitempty"` HostPort int32 `json:"hostPort,omitempty"` ContainerPort int32 `json:"containerPort,omitempty"` Protocol string `json:"protocol,omitempty"` HostIP net.IP `json:"hostIP,omitempty"` ServicePort ServicePort PodStatus string `json:"status,omitempty"` }
func PodsToPodPorts ¶
type ServicePort ¶
type ServicePort struct { Type string `json:"type,omitempty"` ClusterIP net.IP `json:"clusterIP,omitempty"` ServiceName string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` ExternalIP net.IP AppSelector string Host string SourcePortName string `json:"name,omitempty"` Protocol string `json:"protocol,omitempty"` SourcePort int32 `json:"port,omitempty"` NodePort int32 `json:"nodePort,omitempty"` TargetPort int32 `json:"targetPort,omitempty"` TargetPortName string `json:"targetPort,omitempty"` IngressPath IngressPath PodPort []*PodPort }
func ServicesToServicePorts ¶
func ServicesToServicePorts(apiServices *v1.ServiceList) (servicePorts []*ServicePort)
Click to show internal directories.
Click to hide internal directories.