-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathcontext_schema.yml
80 lines (80 loc) · 2.76 KB
/
context_schema.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
$schema: http://json-schema.org/draft-07/schema#
$id: Context
description: |-
A context JSON object is a mapping of resource identifiers to
`ContextResource` specifications.
type: object
properties:
<resource-type>:
$ref: ContextResource
description: |-
Overrides the default resource for the given
:literal:`<resource-type>`, which must be a supported resource type.
<resource-type>#<id>:
$ref: ContextResource
description: |-
Defines a resource with identifier :literal:`<id>` of the given
:literal:`<resource-type>`. The resource specification must be compatible with
:literal:`<resource-type>`.
examples:
- "cache_pool":
total_bytes_limit: 10000000
"cache_pool#remote":
total_bytes_limit: 100000000
"data_copy_concurrency":
limit: 8
definitions:
resource:
$id: ContextResource
description: |-
Specifies a context resource of a particular :literal:`<resource-type>`.
oneOf:
- oneOf:
- type: object
- type: boolean
- type: number
description: |-
Specifies the resource directly. Any constraints on the value are
determined by the particular :literal:`<resource-type>`.
- type: string
description: |-
References another resource of the same type in the current or parent
context using the syntax ``"<resource-type>"`` or
``"<resource-type>#<id>"``, where :literal:`<resource-type>`
matches the type of this resource.
- type: 'null'
description: |-
Specifies a new instance of the default resource of the given
:literal:`<resource-type>`. Only valid within a `Context` specification.
cache_pool:
$id: Context.cache_pool
description: |-
Specifies the size of an in-memory Least Recently Used (LRU) cache. Each
:literal:`cache_pool` resource specifies a separate memory pool.
type: object
properties:
total_bytes_limit:
type: integer
minimum: 0
description: |-
Soft limit on the total number of bytes in the cache. The
least-recently used data that is not in use is evicted from the cache
when this limit is reached.
default: 0
data_copy_concurrency:
$id: Context.data_copy_concurrency
description: |-
Specifies a limit on the number of CPU cores used concurrently for data
copying/encoding/decoding.
type: object
properties:
limit:
oneOf:
- type: integer
minimum: 1
- const: "shared"
description: |-
The maximum number of CPU cores that may be used. If the special
value of ``"shared"`` is specified, a shared global limit equal to the
number of CPU cores/threads available applies.
default: "shared"