Skip to content

Commit

Permalink
docs/openapi: Add new config options
Browse files Browse the repository at this point in the history
Add entries for the new 'backlog' and 'listen_threads' config options
introduced in commits 57c88fd ("router: Make the number of router
threads configurable") and 76489fb ("conf, router: Make the listen(2)
backlog configurable").

Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 authored and avahahn committed Aug 21, 2024
1 parent 05b1c76 commit cff18f8
Showing 1 changed file with 152 additions and 0 deletions.
152 changes: 152 additions & 0 deletions docs/unit-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2791,6 +2791,72 @@ paths:
"404":
$ref: "#/components/responses/responseNotFound"

/config/listeners/{listenerName}/backlog:
summary: "Endpoint for the `listeners/{listenerName}/backlog` option"
get:
operationId: getListenerBacklog
summary: "Retrieve the backlog option in a listener"
description: "Retrieves the `backlog` option that configures the
listen(2) backlog parameter where the `{listenerName}` listener object
[passes its requests](https://unit.nginx.org/configuration/#listeners)."

tags:
- listeners
- config

parameters:
- $ref: "#/components/parameters/listenerName"

responses:
"200":
description: "OK; the `backlog` option exists in the configuration."
content:
application/json:
schema:
type: integer

examples:
example1:
$ref: "#/components/examples/configListenerBacklog"

"404":
$ref: "#/components/responses/responseNotFound"

put:
operationId: updateListenerBacklog
summary: "Update the backlog option in a listener"
description: "Overwrites the `backlog` option."
tags:
- listeners
- config

parameters:
- $ref: "#/components/parameters/listenerName"

requestBody:
required: true
content:
application/json:
schema:
type: integer

examples:
example1:
$ref: "#/components/examples/configListenerBacklog"

responses:
"200":
$ref: "#/components/responses/responseOkUpdated"

"400":
$ref: "#/components/responses/responseBadRequest"

"404":
$ref: "#/components/responses/responseNotFound"

"500":
$ref: "#/components/responses/responseInternalError"

/config/routes:
summary: "Endpoint for the `routes` entity in the configuration"
get:
Expand Down Expand Up @@ -2943,6 +3009,87 @@ paths:
"404":
$ref: "#/components/responses/responseNotFound"

/config/settings/listen_threads:
summary: "Endpoint for the `listen_threads` option in `settings`"
get:
operationId: getSettingsListenThreads
summary: "Retrieve the listen_threads option from settings"
description: "Retrieves the `listen_threads` option that represents
Unit's [listen threads]
(https://unit.nginx.org/configuration/#settings)."

tags:
- settings
- config

responses:
"200":
description: "OK; the `listen_threads` option exists in the
configuration."

content:
application/json:
schema:
type: integer

examples:
ListenThreads:
value: 16

"404":
$ref: "#/components/responses/responseNotFound"

put:
operationId: updateSettingsListenThreads
summary: "Create or overwrite the listen_threads option"
description: "Creates or overwrites the `listen_threads` option in
the configuration."

tags:
- settings
- config

requestBody:
required: true
content:
application/json:
schema:
type: integer

examples:
ListenThreads:
value: 30

responses:
"200":
$ref: "#/components/responses/responseOkUpdated"

"400":
$ref: "#/components/responses/responseBadRequest"

"404":
$ref: "#/components/responses/responseNotFound"

"500":
$ref: "#/components/responses/responseInternalError"

delete:
operationId: deleteSettingsListenThreads
summary: "Delete the listen_threads option"
description: "Deletes the `listen_threads` option from the
configuration."

tags:
- settings
- config

responses:
"200":
$ref: "#/components/responses/responseOkDeleted"

"404":
$ref: "#/components/responses/responseNotFound"

/config/settings/http:
summary: "Endpoint for the `http` object in `settings`"

Expand Down Expand Up @@ -4961,6 +5108,11 @@ components:
summary: "App target destination in a listener"
value: "applications/php_app/index_target"

# /config/listeners/listenerName}/backlog
configListenerBacklog:
summary: "listen(2) backlog in a listener"
value: 1024

# /config/listeners/{listenerName}/tls
configListenerTls:
summary: "TLS object in a listener"
Expand Down

0 comments on commit cff18f8

Please sign in to comment.