fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

at tngl 13 kB View raw
1{ 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$ref": "#/definitions/MethodConfig", 4 "definitions": { 5 "MethodConfig": { 6 "properties": { 7 "name": { 8 "items": { 9 "$ref": "#/definitions/grpc.service_config.MethodConfig.Name" 10 }, 11 "type": "array" 12 }, 13 "waitForReady": { 14 "additionalProperties": true, 15 "type": "boolean", 16 "description": "Whether RPCs sent to this method should wait until the connection is ready by default. If false, the RPC will abort immediately if there is a transient failure connecting to the server. Otherwise, gRPC will attempt to connect until the deadline is exceeded. The value specified via the gRPC client API will override the value set here. However, note that setting the value in the client API will also affect transient errors encountered during name resolution, which cannot be caught by the value here, since the service config is obtained by the gRPC client via name resolution." 17 }, 18 "timeout": { 19 "pattern": "^([0-9]+\\.?[0-9]*|\\.[0-9]+)s$", 20 "type": "string", 21 "description": "The default timeout in seconds for RPCs sent to this method. This can be overridden in code. If no reply is received in the specified amount of time, the request is aborted and a DEADLINE_EXCEEDED error status is returned to the caller. The actual deadline used will be the minimum of the value specified here and the value set by the application via the gRPC client API. If either one is not set, then the other will be used. If neither is set, then the request has no deadline.", 22 "format": "regex" 23 }, 24 "maxRequestMessageBytes": { 25 "additionalProperties": true, 26 "type": "integer", 27 "description": "The maximum allowed payload size for an individual request or object in a stream (client-\u003eserver) in bytes. The size which is measured is the serialized payload after per-message compression (but before stream compression) in bytes. This applies both to streaming and non-streaming requests. The actual value used is the minimum of the value specified here and the value set by the application via the gRPC client API. If either one is not set, then the other will be used. If neither is set, then the built-in default is used. If a client attempts to send an object larger than this value, it will not be sent and the client will see a ClientError. Note that 0 is a valid value, meaning that the request message must be empty." 28 }, 29 "maxResponseMessageBytes": { 30 "additionalProperties": true, 31 "type": "integer", 32 "description": "The maximum allowed payload size for an individual response or object in a stream (server-\u003eclient) in bytes. The size which is measured is the serialized payload after per-message compression (but before stream compression) in bytes. This applies both to streaming and non-streaming requests. The actual value used is the minimum of the value specified here and the value set by the application via the gRPC client API. If either one is not set, then the other will be used. If neither is set, then the built-in default is used. If a server attempts to send an object larger than this value, it will not be sent, and a ServerError will be sent to the client instead. Note that 0 is a valid value, meaning that the response message must be empty." 33 }, 34 "retryPolicy": { 35 "$ref": "#/definitions/grpc.service_config.MethodConfig.RetryPolicy", 36 "additionalProperties": true 37 }, 38 "hedgingPolicy": { 39 "$ref": "#/definitions/grpc.service_config.MethodConfig.HedgingPolicy", 40 "additionalProperties": true 41 } 42 }, 43 "additionalProperties": true, 44 "type": "object", 45 "title": "Method Config", 46 "description": "Configuration for a method." 47 }, 48 "grpc.service_config.MethodConfig.HedgingPolicy": { 49 "properties": { 50 "maxAttempts": { 51 "type": "integer", 52 "description": "The hedging policy will send up to max_requests RPCs. This number represents the total number of all attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5." 53 }, 54 "hedgingDelay": { 55 "pattern": "^([0-9]+\\.?[0-9]*|\\.[0-9]+)s$", 56 "type": "string", 57 "description": "The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.", 58 "format": "regex" 59 }, 60 "nonFatalStatusCodes": { 61 "items": { 62 "enum": [ 63 "OK", 64 0, 65 "CANCELLED", 66 1, 67 "UNKNOWN", 68 2, 69 "INVALID_ARGUMENT", 70 3, 71 "DEADLINE_EXCEEDED", 72 4, 73 "NOT_FOUND", 74 5, 75 "ALREADY_EXISTS", 76 6, 77 "PERMISSION_DENIED", 78 7, 79 "UNAUTHENTICATED", 80 16, 81 "RESOURCE_EXHAUSTED", 82 8, 83 "FAILED_PRECONDITION", 84 9, 85 "ABORTED", 86 10, 87 "OUT_OF_RANGE", 88 11, 89 "UNIMPLEMENTED", 90 12, 91 "INTERNAL", 92 13, 93 "UNAVAILABLE", 94 14, 95 "DATA_LOSS", 96 15 97 ] 98 }, 99 "type": "array", 100 "title": "Code", 101 "description": "The canonical error codes for gRPC APIs. Sometimes multiple error codes may apply. Services should return the most specific error code that applies. For example, prefer `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`." 102 } 103 }, 104 "additionalProperties": true, 105 "type": "object", 106 "title": "Hedging Policy", 107 "description": "The hedging policy for outgoing RPCs. Hedged RPCs may execute more than once on the server, so only idempotent methods should specify a hedging policy." 108 }, 109 "grpc.service_config.MethodConfig.Name": { 110 "properties": { 111 "service": { 112 "type": "string", 113 "description": "Required. Includes proto package name." 114 }, 115 "method": { 116 "type": "string" 117 } 118 }, 119 "additionalProperties": true, 120 "type": "object", 121 "title": "Name", 122 "description": "The names of the methods to which this configuration applies. - MethodConfig without names (empty list) will be skipped. - Each name entry must be unique across the entire ServiceConfig. - If the 'method' field is empty, this MethodConfig specifies the defaults for all methods for the specified service. - If the 'service' field is empty, the 'method' field must be empty, and this MethodConfig specifies the default for all methods (it's the default config). When determining which MethodConfig to use for a given RPC, the most specific match wins. For example, let's say that the service config contains the following MethodConfig entries: method_config { name { } ... } method_config { name { service: \"MyService\" } ... } method_config { name { service: \"MyService\" method: \"Foo\" } ... } MyService/Foo will use the third entry, because it exactly matches the service and method name. MyService/Bar will use the second entry, because it provides the default for all methods of MyService. AnotherService/Baz will use the first entry, because it doesn't match the other two. In JSON representation, value \"\", value `null`, and not present are the same. The following are the same Name: - { \"service\": \"s\" } - { \"service\": \"s\", \"method\": null } - { \"service\": \"s\", \"method\": \"\" }" 123 }, 124 "grpc.service_config.MethodConfig.RetryPolicy": { 125 "properties": { 126 "maxAttempts": { 127 "type": "integer", 128 "description": "The maximum number of RPC attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5." 129 }, 130 "initialBackoff": { 131 "pattern": "^([0-9]+\\.?[0-9]*|\\.[0-9]+)s$", 132 "type": "string", 133 "description": "Exponential backoff parameters. The initial retry attempt will occur at random(0, initial_backoff). In general, the nth attempt will occur at random(0, min(initial_backoff*backoff_multiplier**(n-1), max_backoff)). Required. Must be greater than zero.", 134 "format": "regex" 135 }, 136 "maxBackoff": { 137 "pattern": "^([0-9]+\\.?[0-9]*|\\.[0-9]+)s$", 138 "type": "string", 139 "description": "Required. Must be greater than zero.", 140 "format": "regex" 141 }, 142 "backoffMultiplier": { 143 "type": "number", 144 "description": "Required. Must be greater than zero." 145 }, 146 "retryableStatusCodes": { 147 "items": { 148 "enum": [ 149 "OK", 150 0, 151 "CANCELLED", 152 1, 153 "UNKNOWN", 154 2, 155 "INVALID_ARGUMENT", 156 3, 157 "DEADLINE_EXCEEDED", 158 4, 159 "NOT_FOUND", 160 5, 161 "ALREADY_EXISTS", 162 6, 163 "PERMISSION_DENIED", 164 7, 165 "UNAUTHENTICATED", 166 16, 167 "RESOURCE_EXHAUSTED", 168 8, 169 "FAILED_PRECONDITION", 170 9, 171 "ABORTED", 172 10, 173 "OUT_OF_RANGE", 174 11, 175 "UNIMPLEMENTED", 176 12, 177 "INTERNAL", 178 13, 179 "UNAVAILABLE", 180 14, 181 "DATA_LOSS", 182 15 183 ] 184 }, 185 "type": "array", 186 "title": "Code", 187 "description": "The canonical error codes for gRPC APIs. Sometimes multiple error codes may apply. Services should return the most specific error code that applies. For example, prefer `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`." 188 } 189 }, 190 "additionalProperties": true, 191 "type": "object", 192 "title": "Retry Policy", 193 "description": "The retry policy for outgoing RPCs." 194 } 195 } 196}