From b8f01d3213d8e1667391e67dea9c727a3c6ddb62 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Tue, 25 Jul 2023 10:27:37 -0700 Subject: [PATCH 1/2] chore(docs): Add spec for `listen` option Signed-off-by: Jesse Szwedko --- docs/specs/component.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/specs/component.md b/docs/specs/component.md index 20e43b4bf5ec3..147c25c4f54d7 100644 --- a/docs/specs/component.md +++ b/docs/specs/component.md @@ -84,6 +84,22 @@ representing multiple endpoints. If a component uses multiple options to automatically build the endpoint, then the `endpoint(s)` option MUST override that process. +#### `listen` + +When a component listens for incoming connections, it SHOULD expose a `listen` option that takes +a `string` representing an address with `:
`. + +Options for `protocol` are: + +- `unix+stream`, where `address` should be a file path +- `unix+datagram`, where `address` should be a file path +- `unix`, same as `unix+stream` +- `tcp`, where `address` should be `:` +- `udp`, where `address` should be `:` + +Components MAY have a default protocol. For example, a `statsd` component may default the protocol +to `udp` and only require the `:` to bind to. + ## Instrumentation **Extends the [Instrumentation Specification].** From a47dffbd6b699e2bb84c4e56a6a0eae011efd96a Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Fri, 28 Jul 2023 13:28:56 -0700 Subject: [PATCH 2/2] Update docs/specs/component.md Co-authored-by: neuronull --- docs/specs/component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/component.md b/docs/specs/component.md index 147c25c4f54d7..ff3ff98819244 100644 --- a/docs/specs/component.md +++ b/docs/specs/component.md @@ -86,7 +86,7 @@ override that process. #### `listen` -When a component listens for incoming connections, it SHOULD expose a `listen` option that takes +When a component listens for incoming connections, it SHOULD expose a `listen` configuration option that takes a `string` representing an address with `:
`. Options for `protocol` are: