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 log.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 IpTor
- type PingSchedule
- type ProbeFn
- type Result
- type ResultHistory
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DebugOutput ¶
func DebugOutput(module *config.Module, logBuffer *bytes.Buffer, registry *prometheus.Registry) string
DebugOutput returns plaintext debug output for a probe.
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 PingSchedule ¶
type PingSchedule struct { Conf *config.SafeConfig Logger log.Logger Limit int Interval time.Duration MaxDeley time.Duration Timeout time.Duration IPProtocol string SourceIPAddress string StopCh chan bool }
func (*PingSchedule) Start ¶
func (ps *PingSchedule) Start()
func (*PingSchedule) Stop ¶
func (ps *PingSchedule) Stop()
type ResultHistory ¶
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 ¶
func (rh *ResultHistory) Add(moduleName, target, debugOutput string, success bool)
Add a result to the history.
func (*ResultHistory) Get ¶
func (rh *ResultHistory) Get(id int64) *Result
Get returns a given result.
func (*ResultHistory) List ¶
func (rh *ResultHistory) List() []*Result
List returns a list of all results.
Click to show internal directories.
Click to hide internal directories.