kubernetes

package
v0.56.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RolePod     = "pod"
	RoleService = "service"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIServer  string   `yaml:"api_server"` // TODO: implement?
	Namespaces []string `yaml:"namespaces"`
	Role       string   `yaml:"role"`
	LocalMode  bool     `yaml:"local_mode"`
	Selector   struct {
		Label string `yaml:"label"`
		Field string `yaml:"field"`
	} `yaml:"selector"`
}

type PodTarget

type PodTarget struct {
	model.Base `hash:"ignore"`

	Address        string
	Namespace      string
	Name           string
	Annotations    map[string]any
	Labels         map[string]any
	NodeName       string
	PodIP          string
	ControllerName string
	ControllerKind string
	ContName       string
	Image          string
	Env            map[string]any
	Port           string
	PortName       string
	PortProtocol   string
	// contains filtered or unexported fields
}

func (PodTarget) Hash

func (p PodTarget) Hash() uint64

func (PodTarget) TUID

func (p PodTarget) TUID() string

type PodTargetDiscoverer

type PodTargetDiscoverer struct {
	*logger.Logger
	// contains filtered or unexported fields
}

func NewPodTargetDiscoverer

func NewPodTargetDiscoverer(pod, cmap, secret cache.SharedInformer) *PodTargetDiscoverer

func (*PodTargetDiscoverer) Discover

func (p *PodTargetDiscoverer) Discover(ctx context.Context, in chan<- []model.TargetGroup)

func (*PodTargetDiscoverer) String

func (p *PodTargetDiscoverer) String() string

type ServiceTarget

type ServiceTarget struct {
	model.Base `hash:"ignore"`

	Address      string
	Namespace    string
	Name         string
	Annotations  map[string]any
	Labels       map[string]any
	Port         string
	PortName     string
	PortProtocol string
	ClusterIP    string
	ExternalName string
	Type         string
	// contains filtered or unexported fields
}

func (ServiceTarget) Hash

func (s ServiceTarget) Hash() uint64

func (ServiceTarget) TUID

func (s ServiceTarget) TUID() string

type ServiceTargetDiscoverer

type ServiceTargetDiscoverer struct {
	*logger.Logger
	// contains filtered or unexported fields
}

func NewServiceTargetDiscoverer

func NewServiceTargetDiscoverer(inf cache.SharedInformer) *ServiceTargetDiscoverer

func (*ServiceTargetDiscoverer) Discover

func (s *ServiceTargetDiscoverer) Discover(ctx context.Context, ch chan<- []model.TargetGroup)

func (*ServiceTargetDiscoverer) String

func (s *ServiceTargetDiscoverer) String() string

type TargetDiscoverer

type TargetDiscoverer struct {
	*logger.Logger
	// contains filtered or unexported fields
}

func NewTargetDiscoverer

func NewTargetDiscoverer(cfg Config) (*TargetDiscoverer, error)

func (*TargetDiscoverer) Discover

func (d *TargetDiscoverer) Discover(ctx context.Context, in chan<- []model.TargetGroup)

func (*TargetDiscoverer) String

func (d *TargetDiscoverer) String() string

Jump to

Keyboard shortcuts

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