Skip to content
File

Blob: src/workerd/io/features.capnp

1.1 KB
1# Copyright (c) 2017-2022 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 
5@0x8b3d4aaa36221ec9;
6 
7using Cxx = import "/capnp/c++.capnp";
8$Cxx.namespace("workerd");
9$Cxx.allowCancellation;
10 
11enum Features {
12 test @0;
13 # A test feature that should never be used in production code.
14 
15 # Due to a number of practical limitations on the metrics collection,
16 # we do not really want the list of features to grow unbounded over
17 # time. At any given point in time we shouldn't be trying to track
18 # more than 50 features at a time.
19 #
20 # Features we are no longer needing to track can and should be removed,
21 # just be careful to adjust the index ordinals of the remaining features
22 # correctly. In code, be sure to never rely on the ordinal value and
23 # instead always use the features enum to ensure that things won't break.
24 
25 # We want to determine how users typically read the data from a Blob.
26 # The reason is so that we can determine how best to optimize the Blob
27 # implementation.
28 blobAsArrayBuffer @1;
29 blobAsText @2;
30 blobAsStream @3;
31 blobGetData @4;
32}