Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidScheme = validator.ErrInvalidScheme ErrEmptyHost = validator.ErrEmptyHost ErrSSRFForbiddenIP = validator.ErrSSRFForbiddenIP ValidateSafeURL = validator.ValidateSafeURL )
Functions ¶
This section is empty.
Types ¶
type CheckPayload ¶
type CheckPayload struct {
MonitorID string `json:"monitor_id"`
TargetURL string `json:"target_url"`
}
CheckPayload represents task parameter data passed into probe workers.
type HTTPProbeResult ¶
HTTPProbeResult contains the metrics collected from an HTTP/HTTPS request probe.
func ExecuteHTTPProbe ¶
func ExecuteHTTPProbe(targetURL string, timeout time.Duration) *HTTPProbeResult
ExecuteHTTPProbe performs a synthetic HTTP/HTTPS probe against targetURL with timeout and SSRF protection.
type SSLProbeResult ¶
type SSLProbeResult struct {
ExpirationDate *time.Time
DaysRemaining int
Issuer string
ErrorMessage string
IsValid bool
}
SSLProbeResult contains SSL/TLS certificate metadata collected from a target.
func ExecuteSSLProbe ¶
func ExecuteSSLProbe(targetURL string, timeout time.Duration) *SSLProbeResult
ExecuteSSLProbe connects via TLS to targetURL to inspect server certificate validity and expiry.
type WorkerEngine ¶
type WorkerEngine struct {
DB *gorm.DB
Notifier *notifier.NotificationEngine
}
WorkerEngine processes synthetic probes and updates database telemetry.
func NewWorkerEngine ¶
func NewWorkerEngine(database *gorm.DB, notifierEngine *notifier.NotificationEngine) *WorkerEngine
NewWorkerEngine creates a new WorkerEngine instance with alerting capabilities.
func (*WorkerEngine) ProcessHTTPCheck ¶
func (w *WorkerEngine) ProcessHTTPCheck(payloadRaw []byte) error
ProcessHTTPCheck executes an HTTP uptime check for a monitor and handles incident state transitions.
func (*WorkerEngine) ProcessSSLCheck ¶
func (w *WorkerEngine) ProcessSSLCheck(payloadRaw []byte) error
ProcessSSLCheck executes an SSL certificate inspection probe for a monitor.