File
Blob: src/workerd/util/account-limits.h
| 1 | // Copyright (c) 2017-2025 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | #pragma once |
| 5 | |
| 6 | namespace workerd { |
| 7 | |
| 8 | // Interface for enforcing various actor related account limits. |
| 9 | // Non-functional in workerd, but used to enforce free tier account limits internally. |
| 10 | class ActorAccountLimits { |
| 11 | public: |
| 12 | // Throws if the associated account is no longer allowed to execute sqlite queries |
| 13 | virtual void requireActorCanExecuteQueries() const {}; |
| 14 | |
| 15 | // Allow default equality comparison |
| 16 | bool operator==(const ActorAccountLimits&) const = default; |
| 17 | }; |
| 18 | |
| 19 | } // namespace workerd |