metrics

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewMetrics added in v1.0.0

type NewMetrics struct {
	Name     string
	IP       string
	Diff     int
	Open     []string
	Closed   []string
	Expected []string
}

NewMetrics is the type that will transit between scan and metrics. It carries informations that will be used for calculation, such as expected ports.

type PingInfo added in v1.0.0

type PingInfo struct {
	Name         string
	IP           string
	IsResponding bool
	RTT          time.Duration
}

PingInfo holds the ping update of a specific target

type Server added in v1.0.0

type Server struct {
	// contains filtered or unexported fields
}

Server is the metrics server. It contains all the Prometheus metrics

func Init added in v1.0.0

func Init() *Server

Init initialize the metrics

func (*Server) StartServ added in v1.0.0

func (s *Server) StartServ(nTargets int) error

StartServ starts the prometheus server.

func (*Server) Updater added in v1.0.0

func (s *Server) Updater(metChan chan NewMetrics, pingChan chan PingInfo, pending chan int)

Updater updates metrics

Jump to

Keyboard shortcuts

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