Documentation
¶
Index ¶
- Variables
- func DebugOutput(module *config.Module, logBuffer *bytes.Buffer, registry *prometheus.Registry) string
- func Handler(w http.ResponseWriter, r *http.Request, c *config.Config, logger *slog.Logger, ...)
- func ProbeDNS(ctx context.Context, target string, module config.Module, ...) bool
- func ProbeGRPC(ctx context.Context, target string, module config.Module, ...) (success bool)
- func ProbeHTTP(ctx context.Context, target string, module config.Module, ...) (success bool)
- func ProbeICMP(ctx context.Context, target string, module config.Module, ...) (success bool)
- func ProbeTCP(ctx context.Context, target string, module config.Module, ...) bool
- type GRPCHealthCheck
- type ProbeFn
- type Result
- type ResultHistory
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DebugOutput ¶ added in v0.23.0
func DebugOutput(module *config.Module, logBuffer *bytes.Buffer, registry *prometheus.Registry) string
DebugOutput returns plaintext debug output for a probe.
func Handler ¶ added in v0.23.0
func Handler(w http.ResponseWriter, r *http.Request, c *config.Config, logger *slog.Logger, rh *ResultHistory, timeoutOffset float64, params url.Values, moduleUnknownCounter prometheus.Counter, logLevelProber *promslog.AllowedLevel)
Types ¶
type GRPCHealthCheck ¶ added in v0.20.0
type GRPCHealthCheck interface {
Check(c context.Context, service string) (bool, codes.Code, *peer.Peer, string, error)
}
func NewGrpcHealthCheckClient ¶ added in v0.20.0
func NewGrpcHealthCheckClient(conn *grpc.ClientConn) GRPCHealthCheck
type ResultHistory ¶ added in v0.23.0
type ResultHistory struct { MaxResults uint // contains filtered or unexported fields }
ResultHistory contains two history slices: `results` contains most recent `maxResults` results. After they expire out of `results`, failures will be saved in `preservedFailedResults`. This ensures that we are always able to see debug information about recent failures.
func (*ResultHistory) Add ¶ added in v0.23.0
func (rh *ResultHistory) Add(moduleName, target, debugOutput string, success bool)
Add a result to the history.
func (*ResultHistory) GetById ¶ added in v0.25.0
func (rh *ResultHistory) GetById(id int64) *Result
Get returns a given result by id.
func (*ResultHistory) GetByTarget ¶ added in v0.25.0
func (rh *ResultHistory) GetByTarget(target string) *Result
Get returns a given result by url.
func (*ResultHistory) List ¶ added in v0.23.0
func (rh *ResultHistory) List() []*Result
List returns a list of all results.
Click to show internal directories.
Click to hide internal directories.