service

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "services"

Name is the registry key for this scanner.

Variables

This section is empty.

Functions

func NewScanner

func NewScanner() scanner.Scanner

NewScanner returns a scanner that lists all services in a cluster.

Types

type Data

type Data struct {
	// Count is the total number of services.
	Count int `json:"count"`
	// Services lists all services across all namespaces.
	Services []ServiceInfo `json:"services"`
}

Data holds service information for one cluster.

type PortInfo

type PortInfo struct {
	// Name is the port name.
	Name string `json:"name,omitempty"`
	// Port is the service port number.
	Port int32 `json:"port"`
	// Protocol is the port protocol (TCP, UDP, SCTP).
	Protocol string `json:"protocol"`
}

PortInfo describes a single port on a service.

type ServiceInfo

type ServiceInfo struct {
	// Namespace is the namespace containing the service.
	Namespace string `json:"namespace"`
	// Name is the service name.
	Name string `json:"name"`
	// Type is the service type (ClusterIP, NodePort, LoadBalancer, ExternalName).
	Type string `json:"type"`
	// Ports lists the port specifications.
	Ports []PortInfo `json:"ports,omitempty"`
}

ServiceInfo describes a single service.

Jump to

Keyboard shortcuts

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