kernl API
    Preparing search index...

    Function createRuntimeRateLimiter

    • The rate limiter kernl hands to kehto's runtime: the guard profile's budget for each operation class.

      The runtime charges what it is about to carry out, after kernl's own guard let the envelope through: each request a service puts to the firewall, and the storage, settings and applet-to-applet traffic the runtime serves itself. That includes the envelopes kernl held for a hidden window and released later, which meet the budget at the focus the window has then. The configuration is read on every charge, so a profile change applies at once and counters carry over. Where kehto only observes, because a protocol has no way to refuse, a spent budget flags and never blocks. There is no startup burst here: kernl's ingress guard counts every second of a window's life, and the runtime's count of a first second starts when the window was planned, not when it ran.

      Parameters

      • config: () => GuardConfig

        The guard configuration in force, read on every charge.

      Returns TemporalPolicy

      The limiter for permissions.rateLimiter.

      const rateLimiter = createRuntimeRateLimiter(() => pipeline.config);
      const permissions: PermissionAdapter = { ...approvals, rateLimiter };