Skip to main content

webhook_wake_hook

Function webhook_wake_hook 

Source
pub fn webhook_wake_hook(
    name: impl Into<String>,
    verifier: WebhookVerifier,
    app_name: impl Into<String>,
) -> WebhookHook
Expand description

Builds the webhook hook served at /hooks/{name} whose verified deliveries become kernel.wake runs keyed keys::webhook by the ingress (spec 3.2 §7.4, feature webhooks). Register it with WebhookIngress::with_hook.

§Example

use adk_core::webhook::{WebhookSecret, WebhookVerifier};

let secret = WebhookSecret::from_bytes(b"a shared signing key".to_vec()).unwrap();
let hook = adk_kernel::webhook_wake_hook("github", WebhookVerifier::new(secret), "adk-rust");
assert_eq!(hook.name(), "github");