Skip to content

Commit

Permalink
docs: fix port and protocol description for the gateway (#5456)
Browse files Browse the repository at this point in the history
Co-authored-by: Jina Dev Bot <dev-bot@jina.ai>
  • Loading branch information
alaeddine-13 and jina-bot committed Nov 28, 2022
1 parent b1fc108 commit 47da80b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/fundamentals/flow/gateway-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
| `ssl_certfile` | the path to the certificate file | `string` | `None` |
| `ssl_keyfile` | the path to the key file | `string` | `None` |
| `expose_graphql_endpoint` | If set, /graphql endpoint is added to HTTP interface. | `boolean` | `False` |
| `protocol` | Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET']. | `array` | `[<GatewayProtocolType.GRPC: 0>]` |
| `protocol` | Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET']. | `array` | `[<GatewayProtocolType.GRPC: 0>]` |
| `host` | The host address of the runtime, by default it is 0.0.0.0. In the case of an external Executor (`--external` or `external=True`) this can be a list of hosts, separated by commas. Then, every resulting address will be considered as one replica of the Executor. | `string` | `0.0.0.0` |
| `proxy` | If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy | `boolean` | `False` |
| `uses` | The config of the gateway, it could be one of the followings:<br> * the string literal of an Gateway class name<br> * a Gateway YAML file (.yml, .yaml, .jaml)<br> * a docker image (must start with `docker://`)<br> * the string literal of a YAML config (must start with `!` or `jtype: `)<br> * the string literal of a JSON config<br><br> When use it under Python, one can use the following values additionally:<br> - a Python dict that represents the config<br> - a text file stream has `.read()` interface | `string` | `None` |
Expand Down
8 changes: 4 additions & 4 deletions jina/orchestrate/flow/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(
:param prefetch: Number of requests fetched from the client before feeding into the first Executor.
Used to control the speed of data input into a Flow. 0 disables prefetch (1000 requests is the default)
:param protocol: Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param protocol: Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param proxy: If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy
:param py_modules: The customized python modules need to be imported before loading the gateway
Expand Down Expand Up @@ -417,7 +417,7 @@ def __init__(
:param prefetch: Number of requests fetched from the client before feeding into the first Executor.
Used to control the speed of data input into a Flow. 0 disables prefetch (1000 requests is the default)
:param protocol: Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param protocol: Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param proxy: If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy
:param py_modules: The customized python modules need to be imported before loading the gateway
Expand Down Expand Up @@ -1332,7 +1332,7 @@ def config_gateway(
:param prefetch: Number of requests fetched from the client before feeding into the first Executor.
Used to control the speed of data input into a Flow. 0 disables prefetch (1000 requests is the default)
:param protocol: Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param protocol: Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param proxy: If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy
:param py_modules: The customized python modules need to be imported before loading the gateway
Expand Down Expand Up @@ -1426,7 +1426,7 @@ def config_gateway(
:param prefetch: Number of requests fetched from the client before feeding into the first Executor.
Used to control the speed of data input into a Flow. 0 disables prefetch (1000 requests is the default)
:param protocol: Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param protocol: Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: ['GRPC', 'HTTP', 'WEBSOCKET'].
:param proxy: If set, respect the http_proxy and https_proxy environment variables. otherwise, it will unset these proxy variables before start. gRPC seems to prefer no proxy
:param py_modules: The customized python modules need to be imported before loading the gateway
Expand Down
5 changes: 5 additions & 0 deletions jina/parsers/orchestrate/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def mixin_pod_runtime_args_parser(arg_group, pod_type='worker'):
help=port_description,
)
else:
port_description = (
'The port for input data to bind the gateway server to, by default, random ports between range [49152, 65535] will be assigned. '
'The port argument can be either 1 single value in case only 1 protocol is used or multiple values when '
'many protocols are used.'
)
arg_group.add_argument(
'--port',
'--port-expose',
Expand Down
2 changes: 1 addition & 1 deletion jina/parsers/orchestrate/runtimes/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def mixin_gateway_protocol_parser(parser):
type=GatewayProtocolType.from_string,
choices=list(GatewayProtocolType),
default=[GatewayProtocolType.GRPC],
help=f'Possible communication protocols between server and client. Depending on your chosen gateway, choose the convenient protocols from: {[protocol.to_string() for protocol in list(GatewayProtocolType)]}.',
help=f'Communication protocol of the server exposed by the Gateway. This can be a single value or a list of protocols, depending on your chosen Gateway. Choose the convenient protocols from: {[protocol.to_string() for protocol in list(GatewayProtocolType)]}.',
)


Expand Down
2 changes: 2 additions & 0 deletions jina_cli/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
'cloud login': ['--help'],
'cloud logout': ['--help'],
'cloud deploy': ['--help'],
'cloud normalize': ['--help'],
'cloud list': ['--help', '--phase', '--name'],
'cloud status': ['--help', '--verbose'],
'cloud remove': ['--help'],
Expand All @@ -225,6 +226,7 @@
'login',
'logout',
'deploy',
'normalize',
'list',
'status',
'remove',
Expand Down

0 comments on commit 47da80b

Please sign in to comment.