Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pilot-protocol/webhook

Open more actions menu

webhook

ci codecov License: AGPL-3.0

Webhook plugin for the Pilot Protocol daemon. POSTs daemon events (node-discovered, connection-accepted, message-received, etc.) to an HTTP(S) endpoint the operator configures. Subscribes to the in-process event bus, supports URL hot-swap via the WebhookManager interface exposed by pkg/daemon, and includes a circuit breaker plus exponential retry backoff so a flaky downstream doesn't melt the daemon.

Install

import "github.com/pilot-protocol/webhook"

Usage

webhookSvc := webhook.NewService(cfg.WebhookURL)
rt.Register(webhookSvc)

// Pass &webhookManagerAdapter{webhookSvc} into daemon.New(...) as
// the WebhookManager so IPC's `set-webhook` can hot-swap the URL.

Layout

File What it does
webhook.go Core: HTTP client, circuit breaker, retry queue, bus subscriber.
service.go *Servicecoreapi.Service adapter (Name/Order/Start/Stop) + SetURL + Stats. Build tag !no_webhook.
service_disabled.go Stub *Service for -tags no_webhook builds.

Build tags

Tag Effect
no_webhook Compiles a stub that no-ops Start/Stop/SetURL.

License

AGPL-3.0-or-later. See LICENSE.

About

Pilot Protocol webhook plugin — HTTP(S) callbacks for daemon events, with circuit-breaker + retry backoff

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.