Table of Contents

Class WebhookAuditSink

Namespace
JD.AI.Core.Governance.Audit
Assembly
JD.AI.Core.dll

POSTs audit events as JSON to a configured webhook URL. Failures are swallowed so they never break the application.

public sealed class WebhookAuditSink : IAuditSink
Inheritance
WebhookAuditSink
Implements
Inherited Members

Constructors

WebhookAuditSink(HttpClient, string)

public WebhookAuditSink(HttpClient httpClient, string url)

Parameters

httpClient HttpClient
url string

Properties

Name

public string Name { get; }

Property Value

string

Methods

FlushAsync(CancellationToken)

public Task FlushAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task

WriteAsync(AuditEvent, CancellationToken)

public Task WriteAsync(AuditEvent evt, CancellationToken ct = default)

Parameters

evt AuditEvent
ct CancellationToken

Returns

Task