README
¶
proxyfile
Generates a proxy's config from a short file. Envoy first.
What proxyfile is
A proxyfile is a short file, written in YAML or in HOCON, that describes one gateway: the services behind it, the routes
to them, an optional external auth check, the browser origins it admits and, for RPC routes, the methods. proxyfile render turns it into a complete Envoy configuration, written for Envoy 1.40. The same input always gives the same
bytes, so you can commit the generated file and let proxyfile check fail a build when someone edits it by hand or
forgets to render.
Install
Download the release file for your system, check it against the published checksum, and put it on your path.
The release has proxyfile-linux-amd64, proxyfile-linux-arm64, proxyfile-darwin-amd64 and
proxyfile-darwin-arm64, with checksums.txt and proxyfile.schema.json beside them.
curl -fsSLO https://github.com/kitecorp/proxyfile/releases/download/v1.3.0/proxyfile-linux-amd64
curl -fsSLO https://github.com/kitecorp/proxyfile/releases/download/v1.3.0/checksums.txt
shasum -a 256 -c --ignore-missing checksums.txt
install -m 0755 proxyfile-linux-amd64 /usr/local/bin/proxyfile
In a Dockerfile, copy the program out of the image. The image holds /proxyfile and nothing else.
COPY --from=ghcr.io/kitecorp/proxyfile:1.3.0 /proxyfile /usr/local/bin/proxyfile
With Go installed (the Go version go.mod names or newer):
go install github.com/kitecorp/proxyfile/cmd/proxyfile@v1.3.0
Commands
usage: proxyfile render [<file>] -o <envoy.yaml> [--rpc-methods <methods.json>] [--rpc-table <table.json>]
proxyfile check [<file>] -o <envoy.yaml> [--rpc-methods <methods.json>] [--rpc-table <table.json>]
proxyfile schema
proxyfile version
With no file, proxyfile reads Proxyfile, proxyfile.conf, proxyfile.yaml or proxyfile.yml from the working
directory, and exactly one of them must exist.
| Command | What it does |
|---|---|
render |
Reads the proxyfile, the files it includes, the origins file when it names one and the RPC methods, which come from one place: its rpc.methods, the .proto files its rpc.proto names, or, with --rpc-methods, the methods file. Writes the Envoy configuration to the -o path, and with --rpc-table the RPC table too, which needs one of the three. It writes every output only when the whole input is free of problems. |
check |
Renders in memory and compares the bytes with the files on disk. It writes nothing. A missing output file differs. |
schema |
Prints the JSON Schema of the proxyfile format on standard output. |
version |
Prints proxyfile <version>. |
--help, -h and help print the usage text on standard output and exit with 0.
The flags may stand before or after the file. A proxyfile with an rpc entry (- rpc: in YAML, { rpc { ... } } in
HOCON) takes its methods from exactly one of rpc.methods, rpc.proto and --rpc-methods, and methods given with
no rpc entry are refused. --rpc-table needs one of the three. An output path may not name the proxyfile,
a file it includes, its origins file, its methods file or a .proto file it reads, nor the other output.
The generated file starts with this line, and the same input always gives the same bytes:
# Generated by proxyfile. Do not edit: change the proxyfile beside it and run proxyfile render; proxyfile check fails on a hand edit.
Exit codes:
| Code | Meaning |
|---|---|
| 0 | The work is done, or the checked files match what render writes. |
| 1 | The input has problems and nothing is written, or a checked file differs (<path> differs from what proxyfile render writes), or a write fails. |
| 2 | A usage error. The message is printed with the usage text. |
Each problem in the input is printed on standard error as <file>:<line>:<column>: <message>, as
<file>:<line>: <message> when it has no column (a YAML syntax error names only its line, and one the YAML library
places nowhere, such as an unknown anchor after the first line, names the file alone), or as <file>: <message> when
it is about the file as a whole, such as a file that cannot be read. A HOCON file gives a line and column only for
a syntax error, and names every other problem by its key path instead, as <file>: <key path>: <message> (see "The
HOCON form", which also says how a problem in an included file reads). The proxyfile is read first, and a run that
finds problems in it reports all the problems of the first stage that finds any: reading and syntax, then the format of
each key, then the rules that compare keys with each other. When the proxyfile is free of problems, the problems of
the origins file, when origins names one, and of the methods are reported together. For example, a misspelled
listen in a YAML file gives:
gateway.yaml:3:1: "listen" is required here
gateway.yaml:3:1: unknown key "liste"; known here: admin, auth, cors, limits, listen, log, namespace, origins, remove_from_clients, routes, rpc, services, timeouts, tracing
The format
examples/full/gateway.yaml holds every key a proxyfile can have except services.<name>.address and tracing, with
invented values: cors, the origins by environment and rpc.methods are among them. examples/partial writes
address and gives its methods three ways: gateway.yaml with --rpc-methods examples/partial/methods.json,
gateway.conf through include required("rpc-methods.conf"), and Proxyfile through rpc.proto and the .proto
files under proto/. examples/tracing/gateway.yaml writes tracing. Only listen, services, origins and
routes are required. The rest is left out when you do not need it.
# yaml-language-server: $schema=../../schema/proxyfile.schema.json
# Every key a proxyfile can hold, with invented values, except tracing, which has its own example.
namespace: example.gateway
listen: 10000
admin: 9901
limits:
heap: 256MiB
connections: 4096
request_headers: {size: 96KiB, count: 150}
timeouts:
request: none
idle: 90s
upstream_idle: 45s
services:
shop: {http: 8080, grpc: 8081}
accounts: {grpc: 7070, http: 7070, host_header: "127.0.0.1:7070"}
auth:
ask: accounts /auth/check
timeout: 1500ms
enabled: true
when_unavailable: allow
only_with_header: authorization
send: [authorization, x-country]
accept: [x-user-*, x-tier-*]
remove_from_clients: [x-user-*, x-client-*, x-tier-*, x-gateway-*]
cors:
allow_methods: "*"
allow_headers: "*"
expose_headers: "Content-Disposition,X-Request-Id"
max_age: "600"
origins:
live:
hosts: [api.example.com, api.example.org]
origins: ["https://example.com", "https://www.example.com"]
patterns: ["https://*.example.com"]
test:
hosts: [api.test.example.com]
origins: ["http://localhost:3000", "https://test.example.com"]
patterns: ["https://*.test.example.com"]
local:
hosts: [127.0.0.1, localhost]
origins: []
patterns: ["http://*.example.com:*", "http://localhost:*"]
routes:
- {name: accounts-events, pattern: "^/events/[a-z0-9-]+$", to: accounts, auth: off}
- rpc:
retries: 1
to:
example.shop.*: {service: shop, name: shop}
"*": accounts
- {name: accounts-webhooks, path: /api/webhooks, method: POST, to: accounts, rewrite: /hooks/payments, auth: off}
- {name: shop, prefix: /, to: shop, retries: 1}
rpc:
methods:
- {service: example.shop.v1.CartService, method: GetCart, action: browse}
- {service: example.accounts.v1.ProfileService, method: GetProfile}
- {service: example.shop.v1.CartService, method: AddItem, action: buy, reports: [browse]}
log: {status_from: 400, sample: 1%}
The first line points an editor at the schema in this repository. In your own files, use the URL under "Editors".
The examples in this section are YAML, whose file name ends in .yaml or .yml; "The HOCON form" gives the other
names and the same keys in HOCON. An unknown key anywhere is a problem, and the message lists the keys that are known
at that place.
Sizes are a whole number with KiB, MiB or GiB, such as 192MiB. Times are a whole number with ms, s, m or
h, such as 125s, and at most 9223372035s (about 292 years), the largest whole number of seconds below the limit
Envoy sets on a duration. auth.timeout has a lower limit, which its row gives. A percentage is a whole number from
0 to 100 with a %.
Keys
| Key | Meaning | Rule |
|---|---|---|
namespace |
The namespace of the gateway's own metadata, which the routes and the request log use. proxyfile when not written. |
Lower-case letters, digits, dots, - and _, starting with a letter. |
listen |
The port of the public listener, on 0.0.0.0. |
Required. A port from 1 to 65535. |
admin |
The port of the admin listener, on 127.0.0.1. It answers only /ready, /stats and /server_info. No admin listener when not written. |
A port from 1 to 65535, not the same as listen. |
limits |
Limits on memory, connections and request headers. | A mapping of the three keys below. |
limits.heap |
The heap budget: the gateway shrinks its heap at 90% of it and refuses new requests at 98%. | A size such as 192MiB. |
limits.connections |
The most connections at once, from clients and to each service. | A whole number from 1 to 4294967295. |
limits.request_headers |
The largest header block and the most header fields a request may carry. | A mapping with size and count, both required. |
limits.request_headers.size |
The largest header block of a request. | A size such as 96KiB, at most 8MiB. |
limits.request_headers.count |
The most header fields in a request. | A whole number from 1 to 4294967295. |
timeouts |
How long a request, an idle request and an idle connection to a service may last. | A mapping of the three keys below. Each is a time such as 125s, or none. |
timeouts.request |
The longest a whole request may take. Without it a route has Envoy's default of 15 seconds, counted from the end of the request. none removes the limit. |
A time or none. |
timeouts.idle |
The longest a request may go without sending or receiving data. | A time or none. |
timeouts.upstream_idle |
The longest a connection to a service is kept open with no request on it. Envoy's default is 1 hour. | A time or none. |
services |
The services behind the gateway, on the same host, by name. | Required. A mapping from a service name to its settings. A name is lower-case letters, digits and -, starting with a letter. Each service has at least one port. |
services.<name>.http |
The service's HTTP port, spoken as HTTP/1.1. | A port from 1 to 65535. |
services.<name>.grpc |
The service's gRPC port, spoken as HTTP/2 without TLS (h2c). | A port from 1 to 65535. |
services.<name>.host_header |
The Host header a request carries when a route sends it to this service. Without it a request keeps the client's Host. | A host, with an optional port. |
services.<name>.address |
The service's IP address. 127.0.0.1 when not written. |
An IP address, not a name: Envoy looks up no name for a static cluster. |
auth |
The external check every request goes through before it reaches a service. Without auth there is no check. See "The auth check" below. |
A mapping of the keys below. |
auth.ask |
The service and the path the gateway asks. | Required. A service name, a space and a path, such as accounts /check. The service needs an http port. |
auth.timeout |
How long the gateway waits for the answer. | Required. A time such as 2s, at most 4294967295s. none is not accepted. |
auth.enabled |
true runs the check on every request it applies to, false on none. |
Required. true or false. |
auth.when_unavailable |
What happens to a request when the check cannot be asked: allow lets it through, deny refuses it. |
Required. allow or deny. |
auth.only_with_header |
The check runs only on requests that carry this header. A request without it, or with it empty, goes through with no check. | A lower-case header name. |
auth.send |
The request headers the check is sent. A name ending in * is a prefix. |
A list of lower-case header names or prefixes ending in *. |
auth.accept |
The headers of the check's answer that reach the service. A name ending in * is a prefix. |
The same form as send. |
remove_from_clients |
Headers removed from every client request before routing and before any filter, so no route, filter or service sees a client's copy. A name ending in * is a prefix. |
A list of lower-case header names or prefixes ending in *. Envoy holds header names in lower case, so a name with a capital would never match. |
cors |
The CORS settings every environment shares: allow_methods, allow_headers, expose_headers and max_age, each optional, with the rules of the origins section below. |
A mapping. Not written when origins names a file, which holds its own cors. |
origins |
The browser origins each environment admits, by environment name: each environment is a key holding its hosts, origins and patterns. As in 1.0, it may instead name an origins file, relative to this file. |
Required. A mapping with at least one environment, or a file name. See the origins section below. |
routes |
The routes, tried in the order written. The rpc entry (- rpc: in YAML, { rpc { ... } } in HOCON) marks where the RPC routes go. |
Required. A list, not empty. See "Route rules". |
rpc |
The RPC methods the gateway routes, written here or read from .proto files, instead of in a methods file. |
A mapping with exactly one of methods and proto. Not given together with --rpc-methods. |
rpc.methods |
One entry for each RPC method, with the keys of the methods section below. Which service a method goes to is decided by the rpc entry of routes. |
A list, which may be empty. |
rpc.proto |
The RPC methods, read from the .proto files under roots and compiled each time proxyfile runs. See "RPC methods from the protobuf sources" below. |
Optional. A mapping with roots and option, both required. rpc holds exactly one of methods and proto, and proto is not given with --rpc-methods. |
rpc.proto.roots |
The directories that hold the .proto files. Each is an import root, as protoc's --proto_path is: a file's import path is its path under its root, written with /. |
Required. A list of directories, not empty, none written twice. A relative directory is read from the proxyfile's own directory, as origins: <file> is, also when the key is written in an included file; an absolute one as written. |
rpc.proto.option |
The method option that marks a method the gateway routes. | Required. The option's full name, <package>.<name>, with no leading dot (the pattern ^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$). |
log |
Which requests the request log writes. Without log, every request is logged. |
A mapping with status_from and sample, both required. |
log.status_from |
The lowest status that is always logged. | A whole number from 100 to 599. |
log.sample |
The share of the other requests that is logged. | A whole percentage such as 1%. |
tracing |
Trace segments for sampled requests, sent to AWS X-Ray. See "Tracing" below. | A mapping; provider is required in it. |
A proxyfile also has these rules, each reported with the file and where the problem is, a line in YAML and a key path in HOCON:
listenandadminare not the same port.- At least one service is declared, and each service has at least one port.
- A route,
auth.askor an RPC mapping names a service that is declared and has a port of the protocol it needs:httpfor a route and forauth.ask,grpcfor an RPC mapping. auth: offon a route needs anauthkey.corsis not written whenoriginsnames a file, because the generator takes the CORS settings from that file and would ignore this key.- The RPC methods come from one place:
rpc.methods,rpc.protoor--rpc-methods. They need an rpc entry inroutes, and the rpc entry needs them.
Route rules
Each plain route is a mapping with these keys:
| Key | Meaning | Rule |
|---|---|---|
name |
The route's name. It appears in the request log. | Required. Letters, digits, dots, - and _. Not used twice, and not rpc. |
prefix |
Matches paths that start with this text. | A path starting with /. |
path |
Matches this path exactly. | A path starting with /. |
pattern |
Matches paths by this regular expression, in RE2 syntax. | A regular expression that is not empty and compiles. |
method |
Matches only requests with this HTTP method. | An HTTP method in capitals, such as POST. |
to |
The service the route goes to. | Required. A declared service with an http port. |
rewrite |
Replaces the matched prefix or path before the request goes to the service. | A path starting with /. Not allowed with pattern. |
auth |
off sends the route's requests to the service without the check. |
off. Needs an auth key. |
retries |
How many times a request that never reached the service is tried again. | A whole number from 0 to 4294967295. |
How routes are matched:
- The routes are tried in the order written, and the first that matches wins. Every environment gets the same list. Put
a
prefix: /route last, because it matches every path. - Write exactly one of
prefix,pathandpatternon each route. - Two routes with the same kind of match, the same text and the same
methodare a problem, because the later one is never reached. - A retry happens only when the request never reached the service (Envoy's
connect-failureandreset-before-requestconditions), so a request that the service saw is never sent twice.
The rpc entry (- rpc: in YAML, { rpc { ... } } in HOCON) is a place in the list. It holds one route for each method
of rpc.methods, of the .proto files rpc.proto reads, or of the methods file, matched on the exact path a call
carries, /<package>.<Service>/<Method>. Those routes are sorted by path and written where the entry stands, so a
plain route written above the entry is tried before the RPC routes, and one written below it after them. A file has
at most one rpc entry, and it needs methods from exactly one of rpc.methods, rpc.proto and --rpc-methods.
| Key | Meaning | Rule |
|---|---|---|
retries |
How many times an RPC call that never reached its service is tried again. | A whole number from 0 to 4294967295. |
to |
The service the RPC methods of each package go to. | Required, not empty. A mapping from a pattern to a service name, or to a mapping with service and an optional name. |
to.<pattern> |
* matches every service. A package name ending in .* matches every service whose full name starts with that package and a dot. A full service name matches that service alone. |
The service needs a grpc port. |
to.<pattern>.name |
The name of the routes. The service's name followed by -rpc when not written. |
Letters, digits, dots, - and _. |
A method goes to the mapping with its exact service name if there is one. Otherwise it goes to the matching pattern with
the longest text, and * is last. The order in which the patterns are written does not matter. A method that no
pattern matches is a problem.
The auth check
With auth present, the gateway asks the service named by auth.ask about each request, in HTTP mode, so the auth
service needs no Envoy-specific type.
- The check gets a request to the path of
ask, never the client's path or query, because paths can carry links and tokens. The headers it gets are the onessendnames and the route's question below. HTTP mode adds the client'sHost, the request's method,AuthorizationandContent-Length: 0, whateversendsays. - Each RPC route adds its question to the check:
x-gateway-actionholds the method'sactionandx-gateway-reportsitsreportsjoined by commas. A plain route adds neither. The question is for the check alone, and no service sees it. x-gateway-timeout-msholds the deadline in milliseconds, the same asauth.timeout, so the auth service can keep its own calls inside it.- The service answers
200to let the request through. The headers of the answer named byacceptare set on the request to the service, replacing any value there. A5xxcounts as a failed call, whichwhen_unavailabledecides. Any other status is sent to the client as a denial. - With
when_unavailable: allow, a request that could not be checked goes through with the headerx-envoy-auth-failure-mode-allowedset, and the gateway writes agateway_auth_unavailablelog line for it. A client's own copy of that header is removed before anything reads it. - A check sent on a connection the auth service is closing fails. Set
timeouts.upstream_idleunder the auth service's own idle timeout, so the gateway closes an idle connection first.
Tracing
With tracing, the gateway takes part in an AWS X-Ray trace. It continues the trace that a request's x-amzn-trace-id
names, or starts one. It sends a segment for each sampled request to an agent over UDP. It passes the trace on to the
service in x-amzn-trace-id, with its own segment as the parent, and the auth check's request carries a subsegment of
it.
tracing:
provider:
xray:
agent: 127.0.0.1:2000
segment: example-gateway
sample:
first: 1
rate: 5%
rules:
# A WebSocket's segment would last as long as the socket, so the gateway samples no handshake by its own
# rule.
- {host: "*", method: "*", path: "/live*", first: 0, rate: 0%}
tags:
environment: {env: APP_ENVIRONMENT, default: local}
request_id: {header: x-request-id}
path_in_url: false
The same in HOCON:
tracing {
provider {
xray {
agent = "127.0.0.1:2000"
segment = example-gateway
sample {
first = 1
rate = 5%
// A WebSocket's segment would last as long as the socket, so the gateway samples no handshake by its own rule.
rules = [
{ host = "*", method = "*", path = "/live*", first = 0, rate = 0% }
]
}
}
}
tags {
environment { env = APP_ENVIRONMENT, default = local }
request_id { header = x-request-id }
}
path_in_url = false
}
examples/tracing/ holds this gateway with auth and remove_from_clients added, in
YAML and HOCON, and the
envoy.yaml it generates.
In the table, xray stands for tracing.provider.xray.
| Key | Meaning | Rule |
|---|---|---|
tracing |
Trace segments for sampled requests. | Optional. A mapping; provider is required in it. |
tracing.provider |
The tracing system the segments go to: a mapping with one key that names it. 1.2 has one, xray. |
Required. A mapping whose one key is xray. |
xray.agent |
Where the segments go over UDP: an X-Ray daemon, or an agent that takes X-Ray segments. | An IPv4 address and a port from 1 to 65535, such as 127.0.0.1:2000. 127.0.0.1:2000 when not written. |
xray.segment |
The name of the gateway's segments, which names its node in X-Ray's service map. | Required. 1 to 200 characters: letters, digits, spaces and _ . : / % & # = + \ - @. |
xray.sample |
Which requests are traced when the request does not say: the rules, then the default. | A mapping of the keys below. Without it no manifest is written and Envoy's own rule applies, which is first: 1, rate: 5%. |
xray.sample.first |
How many requests each second are traced before rate applies. |
A whole number from 0 to 4294967295. 1 when not written. |
xray.sample.rate |
The share of the other requests that is traced. | A whole percentage from 0% to 100%, the form of log.sample. 5% when not written. |
xray.sample.rules |
Rules tried in the order written, before the default. The first that matches a request decides, with its own first and rate. |
A list of the mappings below; it may be empty. |
xray.sample.rules[].host |
Matches the request's Host header, with its port when the request has one. | A pattern of letters, digits, ., -, :, [, ], * and ?. * when not written. |
xray.sample.rules[].method |
Matches the request's method. | A method in capitals, or a pattern of capitals, * and ?. * when not written. |
xray.sample.rules[].path |
Matches the request's path, with its query. | A pattern of printable characters without spaces, starting with / or *. * when not written. |
xray.sample.rules[].first, .rate |
As sample.first and sample.rate, for the requests the rule matches. |
Both required, in the same forms. |
tracing.tags |
Annotations on each segment, by name. | A mapping from a tag name (letters, digits and _) to a mapping with exactly one of env and header, and an optional default. Written order is kept, in both forms. |
tracing.tags.<name>.env |
An environment variable of the gateway's process. | A variable name: letters, digits and _, not starting with a digit. |
tracing.tags.<name>.header |
A request header. | A lower-case header name, the rule of auth.only_with_header. |
tracing.tags.<name>.default |
The value when the variable is unset or the header is absent. Without it the segment gets no tag then. | Text, not empty. |
tracing.path_in_url |
Whether the segment's URL keeps the request's path. | true or false. false when not written. |
Envoy traces a request when a whole number it draws from 0 to 99 is below 100 times the rate, computed in floating
point. 100 times 0.07, 0.14, 0.28, 0.55 and 0.56 comes out a little above the whole number. So rate: 7%, 14%, 28%,
55% and 56% trace 8%, 15%, 29%, 56% and 57% of the requests they apply to. Every other whole percentage is exact.
In host, method and path, * matches any run of characters and ? one character. Case does not matter, and the
pattern must match the whole value. Each is * when not written. A request whose x-amzn-trace-id says Sampled=1 is
traced and one that says Sampled=0 is not, whatever the rules say. Only the other requests are asked of the rules. So
a client can have every request it sends traced, and X-Ray bills for each trace recorded.
path_in_url is false by default, for the reason the request log holds no path: paths can carry links and tokens. A
segment still holds the URL's scheme and host, the method and the user agent. As client_ip it holds the whole
X-Forwarded-For header as it came, or the connection's address when there is none. It holds the status and the
response size. For a request whose content type is application/grpc or application/grpc+<x>, it holds the whole path
in the grpc.path annotation, and no setting removes that. With path_in_url: true the URL keeps the first 256
characters of the path, query included. An environment tag is read by Envoy once, when it starts, never by proxyfile, so
the same proxyfile gives the same bytes on every machine. A tag name is letters, digits and _, because X-Ray filter
expressions take only those annotation keys. A tag with the name of a tag Envoy sets on every segment itself is dropped:
Envoy sets its own tags before the custom tags, and the X-Ray tracer keeps the first value of a name. A tag named error
whose value is true marks the segment as a fault. proxyfile keeps no list of Envoy's tag names.
What is written with the key:
- The provider's fixed parts:
envoy.tracers.xrayand UDP. - The request id extension with
pack_trace_reason: false, sox-request-idstays as the client sent it or Envoy generated it. x-envoy-downstream-service-clusterandx-envoy-downstream-service-node, removed from clients after every other early removal, each unless an entry before it covers it: aremove_from_clientsentry or anauth.acceptname, the rule the question headers follow. Envoy strips them only from an edge request, and withuse_remote_address: false(see "Defaults") no request is one.- None of Envoy's own sampling shares, so the rules decide.
With no agent listening, a segment is dropped and the request is served as before. Without the key, none of this is written, and a 1.1 proxyfile gives 1.1's file byte for byte.
In HOCON, the agent is quoted, agent = "127.0.0.1:2000", because of its colon (see "Quote what HOCON would read
differently"). rate = 5% needs no quotes and is text, while rate = 5 is a number and is refused.
The HOCON form
The same gateway can be written in HOCON (Human-Optimized Config Object Notation, as the Lightbend specification defines it). Every key has the same name, meaning and rules as in the YAML form, and the generated file is the same, byte for byte.
A proxyfile's file name decides its form, never its content. A file named Proxyfile, with a capital P, or a name
ending in .conf is HOCON, a name ending in .yaml or .yml is YAML, and any other name is refused.
# The smallest proxyfile, in HOCON: one service, one route, and the browser origins it admits.
listen = 8000
services {
app { http = 3000 }
}
origins {
all { hosts = [localhost], origins = ["http://localhost:3000"] }
}
routes = [
{ name = app, prefix = /, to = app }
]
examples/full/gateway.conf writes every key but services.<name>.address and tracing
and sits beside examples/full/gateway.yaml, which gives the same file.
examples/tracing/gateway.conf writes tracing and sits beside its YAML twin,
examples/tracing/gateway.yaml.
examples/partial/gateway.conf pulls its methods in with
include required("rpc-methods.conf"): a plain include is skipped when the file is missing, and required refuses it
by name.
The rules of the form:
- Routes are an array.
routes = [ ... ]lists the routes in the order they are tried, and the rpc entry is the item{ rpc { ... } }, where YAML writes- rpc:. It is an array, not an object, because the first route that matches wins and HOCON does not require a reader to keep the order of an object's keys. - Quote what HOCON would read differently. Quote a key that holds
.or*, as in"example.shop.*" = shopand"*" = web: an unquoted dotted key is a path (a.b = 1meansa { b = 1 }), and*is a syntax error outside quotes. Quote any value that holds anything but letters, digits, spaces and.,-,_,/and%(a substitution, below, is the one exception). HOCON refuses most other characters outside quotes, such as*,:,$,^,+,?,=and[, with a syntax error that does not say to quote, except the one for+, which saysoutside quotes. HOCON starts a comment at#and at//, sorewrite = /a#bis read as/a, and proxyfile cannot see the cut. - A string is text, and a number or a boolean is not. So
max_age = "600", which needs text, andlisten = 8000, which needs a number. A word written without quotes, such asallow, is a string. A quoted number where a number belongs, and a plain number where text belongs, are both refused. - A key written twice keeps the later value. Two objects under one key merge, and an array written twice keeps the
later array: a second
routes = [ ... ]replaces the first. Two routes with the same name are a problem in both forms. The YAML form refuses a key written twice. HOCON merges a service or an environment written twice and does not report it. - Includes are relative to the file that holds them, not to the working directory. A relative name may climb out of
that directory, as
include "../shared/origins.conf"does, and an absolute name is read as written, both as HOCON defines.include "other.conf"skips a file that is missing, as HOCON defines, andinclude required("other.conf")refuses it by name. Userequiredfor a file the gateway cannot do without.include file("other.conf")is refused, because HOCON reads a name insidefile(...)from the working directory, so the same proxyfile would read another file from another directory; writeinclude "other.conf", which is read beside the file that holds it. - Substitutions read the files, never the environment.
${name}takes another key of the same file or of its includes. It never reads an environment variable, so the same files give the same bytes on every machine, andlisten = ${HOME}is a problem. The key a substitution reads is a key of the format like any other, so a substitution copies one proxyfile value into another, such asaccept = ${auth.send}. A key of your own, such asport = 3000forhttp = ${port}, is refused as an unknown key:gateway.conf: port: unknown key "port"; known here: admin, auth, cors, .... - The order you write is kept. The generated file lists the services, their ports and the environments as written. When an object is written twice, the merged object lists the keys of the later one first.
- An empty file is an empty object, so the problems name each required key.
What a problem looks like:
- A syntax error is
<file>:<line>:<column>: <message>, with a column, which a YAML syntax error does not have, for examplegateway.conf:3:1: unexpected EOF, expected '}'. - Any later problem is
<file>: <key path>: <message>, because the HOCON reader keeps no line for a value, for examplegateway.conf: services.app.http: "http" must be a whole number from 1 to 65535, not quoted or block text. The key path joins the keys from the top with dots (services.app.http), writes an array item as its index from 0 in square brackets (routes[1].to), and quotes a key that holds anything but letters, digits,-and_(routes[1].rpc.to."example.shop.*"). A problem at the top of the file, such as a missing required key, has no key path:gateway.conf: "listen" is required here. - A message that names another place says
at <key path>where the YAML form sayson line 7, for examplegateway.conf: routes[1].name: route "app" is declared twice (the first is at routes[0].name). - A file that cannot be read is
<file>: the file cannot be read: <reason>, the same text in both forms. An included file is the exception, below. - A problem inside an included file is reported against the file you gave. A syntax error there reads
<file>: parse error at line <n>, col <m>: <message>, for examplegateway.conf: parse error at line 3, col 1: unexpected EOF, expected '}'. It has no:<line>:<column>:after the file, and the line and column are the included file's, because the HOCON library does not say which file it was. A later problem names the key path the included file wrote, for examplegateway.conf: rpc.methods[0]: the report "x,y" of a.v1.S/M contains a comma, the separator of x-gateway-reports. A missinginclude required(...)reads<included file>: cannot read include file: <reason>. - The refusal of
include file(...)names the file that holds the statement, with its line and column, also when that is an included file, for examplea.conf:1:1: include file(...) is read from the working directory, not beside this file; write include required("p.conf"). - The ending
, not quoted or block textfollows a message about a whole number ortrueorfalsethat was written as text. It is the YAML form's wording; in HOCON it means a string, and an unquoted word is one too, sohttp = abcgets it.
Editor support
IntelliJ IDEA and the other JetBrains IDEs highlight HOCON through the HOCON plugin, org.jetbrains.plugins.hocon,
which reads .conf files. A Proxyfile has no extension, so add the file name pattern Proxyfile to the HOCON file
type under Settings, Editor, File Types (proxyfile.conf needs no pattern).
VS Code highlights it through the HOCON extension sabieber.HOCON, which reads .conf and .hocon files as the
language hocon; "files.associations": {"Proxyfile": "hocon"} in its settings adds the name.
GitHub colours a file by Linguist, which knows HOCON but maps it only to .hocon and two scalafmt file names, so a
repository's .gitattributes gets the line Proxyfile linguist-language=HOCON, and
*.conf linguist-language=HOCON where its .conf files are proxyfiles, as in:
Proxyfile linguist-language=HOCON
*.conf linguist-language=HOCON
This repository's .gitattributes holds both.
The origins file and the methods file
Since 1.1 both can be written in the proxyfile: the environments under origins, the CORS settings under cors, and
the methods under rpc.methods. From 1.3 the methods can also be read from the .proto files, with rpc.proto. A
HOCON proxyfile that wants a separate file uses include, as examples/partial/gateway.conf does for its methods.
The 1.0 way stays accepted in every 1.x release, with the same rules: origins: <file> names a JSON origins file,
and --rpc-methods <file> a JSON methods file. Any two of rpc.methods, rpc.proto and --rpc-methods together
are refused, because exactly one gives the methods. cors in the proxyfile is refused too when origins names a
file.
The two files are JSON. They are read with the YAML reader, so a problem in either names its line and column, and a
syntax error its line. A slash escaped as \/, which JSON allows and some writers produce, is read as /.
The origins file
When origins names a file, a relative path is read from the proxyfile's directory, and an absolute path as written.
Written in the proxyfile, origins is instead a mapping from each environment's name to its hosts, origins and
patterns, and cors is a key of its own beside it, as examples/full/gateway.yaml above shows. Every key and rule
below holds in both places, with two differences. The file writes an environment's name as name, and the proxyfile as
the key. A HOCON proxyfile merges an environment written twice, where the file and the YAML form report it. An origins
file looks like this:
{
"cors": {
"allow_methods": "*",
"allow_headers": "*",
"expose_headers": "Content-Disposition,X-Request-Id",
"max_age": "600"
},
"environments": [
{
"name": "live",
"hosts": ["api.example.com", "api.example.org"],
"origins": ["https://example.com", "https://www.example.com"],
"patterns": ["https://*.example.com"]
},
{
"name": "test",
"hosts": ["api.test.example.com"],
"origins": ["http://localhost:3000", "https://test.example.com"],
"patterns": ["https://*.test.example.com"]
},
{
"name": "local",
"hosts": ["127.0.0.1", "localhost"],
"origins": [],
"patterns": ["http://*.example.com:*", "http://localhost:*"]
}
]
}
| Key | Meaning | Rule |
|---|---|---|
cors |
The CORS settings every environment shares. | Optional, like every key in it. |
cors.allow_methods |
The value of Access-Control-Allow-Methods. |
Text. |
cors.allow_headers |
The value of Access-Control-Allow-Headers. |
Text. |
cors.expose_headers |
The value of Access-Control-Expose-Headers. |
Text. |
cors.max_age |
The value of Access-Control-Max-Age: how long a browser may keep a preflight answer. |
A number of seconds, as text. |
environments |
The environments, each with its hosts and the browser origins it admits. | Required. A list with at least one environment. |
environments[].name |
The environment's name. It names the environment's virtual host. | Required. Not empty, and not used by another environment. |
environments[].hosts |
The host names the environment serves, without a port. | Required, not empty. Lower-case host names, such as api.example.com. No host is in two environments. |
environments[].origins |
The browser origins admitted exactly, each scheme://host[:port]. |
Lower case, http or https, no path. |
environments[].patterns |
The browser origins admitted by pattern, where * matches any run of characters, dots included. |
scheme://host[:port] with at least one *. |
Each list is sorted in byte order and holds no value twice, so adding or removing a value changes one line.
Each environment becomes one virtual host. It serves the environment's hosts, and the port in the Host header plays no part, so a local setup may reach the gateway on any port. A browser request is admitted when:
- it carries no
Originheader, or - its
Originis one of the environment's own hosts, on either scheme and any port, or - its
Originis in the environment'soriginsor matches one of itspatterns.
Any other browser origin is refused with 403, preflights, requests and WebSocket upgrades alike, before CORS, the auth
check or any service sees it. For an admitted origin the gateway answers every preflight itself, so none reaches a
service or the check. On every other answer it sets Access-Control-Allow-Origin, and Access-Control-Expose-Headers
when expose_headers is written, replacing any the service sent. The max_age lets a browser keep an admitted
preflight, so an origin removed from the file may keep working that long in a browser that cached its preflight.
The methods file
The methods are a list with one entry for each RPC method the gateway routes. They are the proxyfile's rpc.methods,
the methods rpc.proto reads from the .proto files (see "RPC methods from the protobuf sources"), or, the 1.0 way,
a JSON file that the --rpc-methods flag names. Which service a method goes to is decided by the rpc entry of
routes, not by this list. This is a methods file; written as rpc.methods, it is the same list.
[
{"service": "example.shop.v1.CartService", "method": "GetCart", "action": "browse"},
{"service": "example.accounts.v1.ProfileService", "method": "GetProfile"},
{"service": "example.shop.v1.CartService", "method": "AddItem", "action": "buy", "reports": ["browse"]}
]
| Key | Meaning | Rule |
|---|---|---|
service |
The full name of the method's service. | Required. A full service name such as shop.v1.CartService. |
method |
The method's name. | Required. A name such as AddItem. |
action |
The action the check is told for this method, in x-gateway-action. |
Text. Empty when not written. |
reports |
The reports the check is told for this method, in x-gateway-reports. |
A list of text. No report contains a comma, because the list is sent as one value joined by commas. |
A method listed twice is a problem.
RPC methods from the protobuf sources
rpc.proto names the directories of .proto files and the method option that marks a routed method. proxyfile
compiles the files in memory each time it renders or checks, so no list of methods is written anywhere. In YAML, it
reads rpc: {proto: {roots: [proto], option: example.gateway.v1.route}}.
The same in HOCON, as it stands in examples/partial/Proxyfile:
rpc {
proto {
roots = [proto]
option = example.gateway.v1.route
}
}
examples/partial/Proxyfile holds the whole gateway.
The roots hold two files, first example/gateway/v1/route.proto, which declares the option:
syntax = "proto3";
package example.gateway.v1;
import "google/protobuf/descriptor.proto";
// What the gateway asks the auth check before a browser reaches a method.
message Route {
// The action the caller must hold; empty means any caller may reach the method.
string action = 1;
// The actions the answer reports on.
repeated string reports = 2;
}
extend google.protobuf.MethodOptions {
// Marks a method the gateway routes. A method without it is not routed.
Route route = 50000;
}
then example/backend/v1/reports.proto, which uses it:
syntax = "proto3";
package example.backend.v1;
import "example/gateway/v1/route.proto";
service ReportService {
// Routed: a browser may call it, and the check is asked for the action read.
rpc ListReports(ListReportsRequest) returns (ListReportsResponse) {
option (example.gateway.v1.route) = {action: "read", reports: ["export", "share"]};
}
// Not routed: no route option.
rpc RebuildReports(RebuildReportsRequest) returns (RebuildReportsResponse);
}
message ListReportsRequest {}
message ListReportsResponse {}
message RebuildReportsRequest {}
message RebuildReportsResponse {}
The gateway then routes one method, /example.backend.v1.ReportService/ListReports, with the action read and the
reports export and share: the list examples/partial/rpc-methods.conf writes by hand.
What proxyfile does with the keys, in this order, each step only when the steps before it found no problem:
- It reads the roots: every file whose name ends in
.proto, at any depth under each root. A root may be a symbolic link to a directory; below a root a linked.protofile is read as the file it names and a linked directory is not walked. A root that cannot be read, that is not a directory or that holds no.protofile is a problem, and so are two roots that hold a file at the same import path, because an import of that path would always read the first root's file and nothing would read the other. - It parses every file it read. A syntax error is a problem with its file, line and column.
- It chooses the files to compile: each file that declares a service, and every file it imports, at any depth. A file
that declares no service and is imported by none of those is parsed but not compiled: it has no method, and
compiling it could only fail on an import no route needs. Every import of a chosen file names a file under a root,
or one of the
google/protobuffiles protoc ships, which proxyfile carries built in (a root's own copy of one of them comes first). Before it compiles, proxyfile names every import that names neither, at its import statement. - It compiles the chosen files in memory with
github.com/bufbuild/protocompile. Every compile error that library reports is a problem with its file, line and column: an unknown type, a symbol declared twice (so a service or a method declared twice never reaches the routes), an option used where its type does not fit. - It finds the option by its full name among the compiled files. It extends
google.protobuf.MethodOptionsand holds one message, and that message has a fieldactionthat holds one string; anything else is a problem. A fieldreportsis optional; when the message has it, it holds a list of strings. Other fields of the message are left alone. - It routes each method of each compiled service that carries the option, with the option's
action, and itsreportswhen the message has that field (none otherwise). A method without the option is not routed. A method whose option leavesactionempty is routed with the empty action, as a methods-file entry with noactionis. - It sorts the methods by path,
/<service>/<method>, in byte order, and hands them on.
Accepted without a word: a method without the option; an option whose message has no reports field (then no method
reports anything); a method whose action is empty; an option that no method carries, which routes nothing, as
methods: [] does; a file that declares no service and that no such file imports, even one whose imports name no
file; every field of the option's message other than action and reports.
The syntax is fixed, with no key: proxyfile reads proto2, proto3 and edition 2023 files, and a file in edition 2024 is
a compile error. It reads no descriptor set, no buf.yaml and nothing from the network: only the files under the
roots and the google/protobuf files it carries.
A problem is printed as every other problem is (see "Commands"): a problem about a key at its line in YAML and at its
key path in HOCON, a problem in a .proto file at that file's line and column. A .proto file is named by its root,
resolved against the proxyfile's directory, joined with its import path.
| Case | Where | Message |
|---|---|---|
rpc holds both methods and proto, or neither |
the rpc key |
exactly one of methods, proto is needed here |
rpc.proto and --rpc-methods |
the proto key |
rpc.proto is written here, so --rpc-methods must not be given |
An empty roots |
the roots key |
the roots list is empty |
| A root written twice | the second | the root "proto" is written twice (the first on line 4); in HOCON (the first at rpc.proto.roots[0]) |
| A root that cannot be read | the root | the root examples/partial/proto cannot be read: no such file or directory, the reason as the system words it |
| A root that is not a directory | the root | the root examples/partial/proto is not a directory |
A root with no .proto file |
the root | the root examples/partial/proto holds no .proto file |
| One import path under two roots | the later file | the import path a/v1/s.proto is also under the root first/proto, which comes first in rpc.proto.roots |
| A syntax error | its file, line and column | protocompile's text, such as syntax error: expecting ';' |
| An import that names no file | the import statement | the import google/rpc/error_details.proto is under no root of rpc.proto.roots and is not a standard google/protobuf file |
| A compile error | its file, line and column | protocompile's text, such as method a.v1.S.M: unknown request type Missing, or symbol "a.v1.S.M" already defined at a/v1/s.proto:6:7, which names the other place by its import path, as protocompile writes it |
| No compiled file defines the option | the option key |
no compiled file defines the option example.gateway.v1.rout; the compiled files are those under the roots that declare a service, and the files they import |
| The name is not an option | the option key |
example.gateway.v1.Route is a message, not an option, with the kind the name has |
| The option is not a method option | the option key |
the option o.v1.route extends google.protobuf.MessageOptions, not google.protobuf.MethodOptions |
| The option does not hold one message | the option key |
the option o.v1.route holds a string, not one message, or holds a list of messages, not one |
No action that holds one string |
the option key |
the option's message o.v1.Route has no field action that holds one string |
A reports that is not a list of strings |
the option key |
the field reports of the option's message o.v1.Route is not a list of strings |
check compiles the sources as render does, so a change to a routed method makes check fail until the next
render. Every .proto file read is an input, so no output path may name one.
The RPC table
--rpc-table writes the routes as JSON for other programs to read, for example one that answers the check. It is a JSON
array with one object per line, sorted by path, and it ends with a newline. Each object has service, method,
action (empty when not written), reports (empty when not written) and cluster, the cluster the call goes to. With
no methods the table is []. This is the table of the methods above:
[
{"service": "example.accounts.v1.ProfileService", "method": "GetProfile", "action": "", "reports": [], "cluster": "accounts_grpc"},
{"service": "example.shop.v1.CartService", "method": "AddItem", "action": "buy", "reports": ["browse"], "cluster": "shop_grpc"},
{"service": "example.shop.v1.CartService", "method": "GetCart", "action": "browse", "reports": [], "cluster": "shop_grpc"}
]
Defaults
Everything the format has no key for is the same in every gateway proxyfile writes.
- One public listener on
0.0.0.0, so a container runtime can publish the port. Who may reach it is the network's rule, not the gateway's. Each service gets one cluster for each port it declares, named<service>_httpand<service>_grpc, with no TLS to the service. - A proxy stands in front of the gateway (
use_remote_address: false).X-Forwarded-Forpasses as it came, andX-Forwarded-Protois kept when present. With no trusted hops, Envoy takes the lastX-Forwarded-Forentry, the one the proxy in front appended, as the client's address. A gateway that faces the internet directly needs a key that does not exist yet. - A browser origin that is not admitted gets
403with the bodyInvalid CORS request, the answer a Spring service gives for a refused origin. Changing it needs a key that does not exist yet. - Every response carries
x-request-id, the client's own when it sent one, so a caller can quote the id of a failed call. It is therequest_idof the request log. - The service's own
Serverheader passes through, and Envoy adds none of its own. The router adds nox-envoy-*header to a request or a response. Vary: Originon every response, added to aVarythe service sent, never replacing it.- No path rewriting. Envoy neither normalizes a path nor merges slashes, so the service's own path rules decide what a path means.
- WebSocket is the one upgrade passed on. Envoy answers any other
Upgradeto a route with403and an empty body. - A service that cannot be reached answers
502with an empty body, where Envoy's own answer is a503or a502with a body that describes the failure. - Headers are removed early. Everything in
remove_from_clients, and withauththe headerx-envoy-auth-failure-mode-allowed, is removed before routing and before any filter. Withauth, the gateway also removes from clients the two question headers and every header the check may set (each name ofauth.accept), whether or notremove_from_clientslists them, because a client must not be able to forge what the gateway asks the check or what the check says. Withtracing,x-envoy-downstream-service-clusterandx-envoy-downstream-service-nodeare removed last, each unless an entry before it covers it. - Retries happen only on
connect-failureandreset-before-request. - The overload manager checks every 0.25 seconds. It exists when
limits.heaporlimits.connectionsis written. - The Connect bridge. Each route of the rpc entry turns a Connect call into gRPC for the service's gRPC port,
and the answer back into Connect. Envoy's bridge still writes the HTTP status of an older Connect error-code table
for four codes, so a small Lua filter sets the current status:
canceled499,deadline_exceeded504,failed_precondition400 andunimplemented501. Both filters are off for every other route. - Route metadata. With
auth, a plain route carries an empty action undernamespace, and an RPC route carries its method's action. A route withauth: offcarries none. The auth-unavailable log line reads it. - Three kinds of JSON log line on standard output. The request log has the fields
time,route,host,method,protocol,status,flags,details,duration_ms,upstream_ms,bytes_in,bytes_out,upstreamandrequest_id, and withauthalsoauthz_us, how long the check took (nullwhen none ran). The upstream failure line (event: gateway_upstream_failure) is written for each request an upstream failed. The auth-unavailable line (event: gateway_auth_unavailable) is written withauthonly. No log line holds a path, query, address, user agent or referrer, because paths can carry links and tokens. Withlog, the request log writes every response at or abovestatus_from, every response with a response flag, andsampleof the rest, chosen by the first eight hex digits ofx-request-id. - The order of the filters: set metadata (with
auth), header mutation, the RBAC refusal of a foreign browser origin, CORS, the auth check (withauth), the Lua status filter and the Connect bridge (with an rpc entry), and the router. A foreign origin is refused before the check could be called.
Fixed names
These names never follow namespace or any other key, because other programs read them. A tool that changes a runtime
value, for example, looks it up by its key.
| Name | What it is |
|---|---|
public |
The listener, its stat_prefix and the route table. |
gateway.ext_authz.enabled |
The runtime key that switches the auth check, written with auth. Its default comes from auth.enabled. |
gateway.request_log.min_status |
The runtime key for the lowest status that is always logged, written with log. Its default comes from log.status_from. |
gateway.request_log.sample |
The runtime key for the share of other requests that is logged, written with log. Its default comes from log.sample. |
gateway.local_reply.origin_refused_status |
The runtime key for the status the Invalid CORS request answer is matched on. Its default is 403. |
browser-origins |
The one RBAC policy of each virtual host. |
x-gateway-action, x-gateway-reports |
The question headers of an RPC route, read by the auth check. |
x-gateway-timeout-ms |
The check's deadline in milliseconds. |
One line of the generated file is meant for a tool to switch by editing the file as text: the default of the auth check.
It stays on one line in flow style for that purpose. It reads {numerator: 100, denominator: HUNDRED} when the check is
on and {numerator: 0, denominator: HUNDRED} when it is off:
default_value: {numerator: 100, denominator: HUNDRED}
proxyfile check fails on an edited file, as it does on any edit, so check the file before a tool edits it. To change
the setting for good, change auth.enabled and render again.
Editors
The JSON Schema of the format gives completion and checking as you type. The schema describes the YAML form only. For a HOCON proxyfile, see "Editor support" under "The HOCON form". Put this line first in a YAML proxyfile, for editors that use the YAML language server, such as VS Code with the YAML extension:
# yaml-language-server: $schema=https://raw.githubusercontent.com/kitecorp/proxyfile/v1.3.0/schema/proxyfile.schema.json
In a JetBrains IDE, open Settings, Languages & Frameworks, Schemas and DTDs, JSON Schema Mappings. Add a mapping with the
schema URL above and a file pattern that matches your YAML proxyfiles, such as gateway.yaml.
proxyfile schema prints the same schema, and each release carries it as proxyfile.schema.json.
Licence
Apache-2.0. See LICENSE.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
proxyfile
command
Command proxyfile writes an Envoy configuration from a proxyfile.
|
Command proxyfile writes an Envoy configuration from a proxyfile. |
|
internal
|
|
|
cli
Package cli is the proxyfile program: its commands, flags, messages and exit codes.
|
Package cli is the proxyfile program: its commands, flags, messages and exit codes. |
|
envoy
Package envoy writes the Envoy configuration of a gateway: it fills the embedded fragments, splices them into one YAML tree and encodes that tree.
|
Package envoy writes the Envoy configuration of a gateway: it fills the embedded fragments, splices them into one YAML tree and encodes that tree. |
|
format
Package format holds the one description of each input file and checks a file's tree against it.
|
Package format holds the one description of each input file and checks a file's tree against it. |
|
input
Package input holds the reading step the readers of the input files share: reading a file as far as a tree its description accepts.
|
Package input holds the reading step the readers of the input files share: reading a file as far as a tree its description accepts. |
|
origins
Package origins reads the browser origins: the CORS settings every environment shares and, for each environment, its hosts and the browser origins it admits.
|
Package origins reads the browser origins: the CORS settings every environment shares and, for each environment, its hosts and the browser origins it admits. |
|
protofiles
Package protofiles reads a gateway's RPC methods from .proto files: it compiles them in memory and returns each method that carries a method option named by its full name, with that option's action and reports.
|
Package protofiles reads a gateway's RPC methods from .proto files: it compiles them in memory and returns each method that carries a method option named by its full name, with that option's action and reports. |
|
quote
Package quote writes text as a JSON string, the form the RPC table and the generated Envoy file both carry.
|
Package quote writes text as a JSON string, the form the RPC table and the generated Envoy file both carry. |
|
read
Package read turns a proxyfile into the model, or into the problems that stop the run.
|
Package read turns a proxyfile into the model, or into the problems that stop the run. |
|
render
Package render reads every input of one run and returns every output, in memory, so a caller writes nothing when any input has a problem.
|
Package render reads every input of one run and returns every output, in memory, so a caller writes nothing when any input has a problem. |
|
rpc
Package rpc reads the RPC methods, from the proxyfile's rpc.methods or from a methods file, gives each method the service the proxyfile's rpc entry maps it to, and writes the RPC table: the routes as JSON, one object per line.
|
Package rpc reads the RPC methods, from the proxyfile's rpc.methods or from a methods file, gives each method the service the proxyfile's rpc entry maps it to, and writes the RPC table: the routes as JSON, one object per line. |
|
testsupport
Package testsupport holds the helpers the tests of several packages share.
|
Package testsupport holds the helpers the tests of several packages share. |
|
tree
Package tree is the boundary between a file's syntax and everything that reads it.
|
Package tree is the boundary between a file's syntax and everything that reads it. |