prober

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MultipleICMP

func MultipleICMP(ctx context.Context, module config.Module, logger log.Logger, dstIPAddr *net.IPAddr) (rtt float32, ttl int, loss int, jitter float32, success bool)

Handle few icmp probes concurrently and count packet loss percent

func ProbeDNS

func ProbeDNS(ctx context.Context, target string, module config.Module, registry *prometheus.Registry, logger log.Logger) bool

func ProbeGRPC

func ProbeGRPC(ctx context.Context, target string, module config.Module, registry *prometheus.Registry, logger log.Logger) (success bool)

func ProbeHTTP

func ProbeHTTP(ctx context.Context, target string, module config.Module, registry *prometheus.Registry, logger log.Logger) (success bool)

func ProbeICMP

func ProbeICMP(ctx context.Context, target string, module config.Module, result config.JSONstruct, logger log.Logger) (isSuccess bool)

Main func to initiate icmp probe or probes - depends on "packets" value.

func ProbeSingleICMP

func ProbeSingleICMP(ctx context.Context, module config.Module, logger log.Logger, dstIPAddr *net.IPAddr, rtt chan float32, ttl chan int, success chan int)

Run single icmp probe

func ProbeTCP

func ProbeTCP(ctx context.Context, target string, module config.Module, registry *prometheus.Registry, logger log.Logger) bool

Types

type GRPCHealthCheck

type GRPCHealthCheck interface {
	Check(c context.Context, service string) (bool, codes.Code, *peer.Peer, string, error)
}

func NewGrpcHealthCheckClient

func NewGrpcHealthCheckClient(conn *grpc.ClientConn) GRPCHealthCheck

type ProbeFn

type ProbeFn func(ctx context.Context, target string, config config.Module, some_json config.JSONstruct, logger log.Logger) bool

Jump to

Keyboard shortcuts

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