logging/Manager: Implement DelayTokenType as an actual opaque

With a bit of tweaking in the JavaScript plugin to support opaque types, this
will allow the delay functionality to work there, too.

Making the LogDelayToken an actual opaque seems reasonable, too. It's not
supposed to be user inspected.
This commit is contained in:
Arne Welzel 2023-11-27 18:18:08 +01:00
parent 2dbb467ba2
commit 5e046eee58
13 changed files with 130 additions and 32 deletions

View file

@ -636,7 +636,7 @@ export {
## Type of the opaque value returned by :zeek:see:`Log::delay`. These
## values can be passed to :zeek:see:`Log::delay_finish` to release a
## delayed write operation.
type DelayToken: any;
type DelayToken: opaque of LogDelayToken;
## Represents a post delay callback that simply returns T. This is used
## as a default value for :zeek:see:`Log::delay` and ignored internally.