alloc_observe.Sink
Internal implementation documentation
Defined in alloc_observe.
A delivery target holding a type-erased context pointer and a function pointer that accepts an event by value and returns void.
API (2)
Fields and members
Public fields and members.
Source
Source: lib/alloc/observe/src/protocol.zig:206
zig
/// A delivery target holding a type-erased context pointer and a function/// pointer that accepts an event by value and returns `void`. Delivery occurs/// synchronously on the thread finishing an observed span, directly in the/// caller execution path with no intermediate queue. Because events from/// distinct threads can arrive concurrently, the callback implementation must/// synchronize access to shared state. The sink provides no internal buffer,/// capacity management, dropping strategy, or error reporting mechanism. The/// caller must guarantee that the `Sink` struct storage itself, the callback/// context, and the callback code remain stable and valid in memory until/// session shutdown returns.pub const Sink = struct { context: *anyopaque, record: *const fn (context: *anyopaque, event: Event) void,};Source: lib/alloc/observe/src/root.zig:427
zig
/// A delivery target holding a type-erased context pointer and a function/// pointer that accepts an event by value and returns `void`. Delivery occurs/// synchronously on the thread finishing an observed span, directly in the/// caller execution path with no intermediate queue. Because events from/// distinct threads can arrive concurrently, the callback implementation must/// synchronize access to shared state. The sink provides no internal buffer,/// capacity management, dropping strategy, or error reporting mechanism. The/// caller must guarantee that the `Sink` struct storage itself, the callback/// context, and the callback code remain stable and valid in memory until/// session shutdown returns.pub const Sink = protocol.Sink;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |