internal

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = log.New(os.Stderr, "DEBUG: ", log.Ltime|log.Lshortfile)
	Info  = log.New(os.Stderr, "INFO:  ", log.Ltime|log.Lshortfile)
	Error = log.New(os.Stderr, "ERROR: ", log.Ltime|log.Lshortfile)
)

Functions

This section is empty.

Types

type Service

type Service struct {
	Opts       ServiceOpts
	Ctx        context.Context
	Config     *rest.Config
	Clientset  *kubernetes.Clientset
	Nodes      []ServiceNode
	Prometheus map[string]*ServicePrometheus
	// contains filtered or unexported fields
}

func NewService

func NewService(opts ServiceOpts) (*Service, error)

func (*Service) CleanupPrometheusTargets added in v0.1.10

func (s *Service) CleanupPrometheusTargets()

func (*Service) PingNodes

func (s *Service) PingNodes() error

func (*Service) PrometheusForTarget

func (s *Service) PrometheusForTarget(target string) (*ServicePrometheus, error)

func (*Service) Run

func (s *Service) Run(stop <-chan os.Signal) error

func (*Service) UpdateNodes

func (s *Service) UpdateNodes() error

type ServiceNode

type ServiceNode struct {
	Name       string
	InternalIP net.IP
}

type ServiceOpts

type ServiceOpts struct {
	SelfNodeName string
	Interval     time.Duration
}

type ServicePrometheus

type ServicePrometheus struct {
	Reachable       prometheus.Gauge
	Latency         prometheus.Histogram
	PacketsSent     prometheus.Counter
	PacketsReceived prometheus.Counter
	PacketsLost     prometheus.Counter
}

func (ServicePrometheus) Register added in v0.1.10

func (sp ServicePrometheus) Register() error

func (ServicePrometheus) Unregister added in v0.1.10

func (sp ServicePrometheus) Unregister()

Jump to

Keyboard shortcuts

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