mirror of
https://github.com/bytedance/g3.git
synced 2026-05-03 14:10:39 +00:00
allow to read from env when setting listen/peer addr
This commit is contained in:
parent
0a3925bd20
commit
c96f8511af
17 changed files with 72 additions and 29 deletions
|
|
@ -5,6 +5,17 @@
|
|||
Base
|
||||
****
|
||||
|
||||
.. _conf_value_env_var:
|
||||
|
||||
env var
|
||||
=======
|
||||
|
||||
**yaml value**: str
|
||||
|
||||
Set a environment variable, in the form '$' + variable name, E.g. $TCP_LISTEN_ADDR.
|
||||
|
||||
The value of the environment variable will be parsed just as you write this value as *yaml string* directly there.
|
||||
|
||||
.. _conf_value_nonzero_u32:
|
||||
|
||||
nonzero u32
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ The keys are:
|
|||
|
||||
* query_peer_addr
|
||||
|
||||
**optional**, **type**: :ref:`sockaddr str <conf_value_sockaddr_str>`
|
||||
**optional**, **type**: :ref:`env sockaddr str <conf_value_env_sockaddr_str>`
|
||||
|
||||
Set the peer udp socket address.
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ The value can be a map, with the following keys:
|
|||
|
||||
* address
|
||||
|
||||
**optional**, **type**: :ref:`sockaddr str <conf_value_sockaddr_str>`
|
||||
**optional**, **type**: :ref:`env sockaddr str <conf_value_env_sockaddr_str>`
|
||||
|
||||
Set the remote socket address.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,17 @@ sockaddr str
|
|||
|
||||
The string should be in *<ip>[:<port>]* format, in which the port may be omitted if a default value is available.
|
||||
|
||||
.. _conf_value_env_sockaddr_str:
|
||||
|
||||
env sockaddr str
|
||||
================
|
||||
|
||||
**yaml value**: :ref:`sockaddr str <conf_value_sockaddr_str>` or :ref:`env var <conf_value_env_var>`
|
||||
|
||||
The string should be in *<ip>[:<port>]* format, in which the port may be omitted if a default value is available.
|
||||
|
||||
.. versionadded:: 1.7.31
|
||||
|
||||
.. _conf_value_ip_addr_str:
|
||||
|
||||
ip addr str
|
||||
|
|
@ -193,7 +204,7 @@ It consists of the following fields:
|
|||
|
||||
* address
|
||||
|
||||
**required**, **type**: :ref:`sockaddr str <conf_value_sockaddr_str>`
|
||||
**required**, **type**: :ref:`env sockaddr str <conf_value_env_sockaddr_str>`
|
||||
|
||||
Set the listen socket address.
|
||||
|
||||
|
|
@ -305,7 +316,7 @@ It consists of the following fields:
|
|||
|
||||
* address
|
||||
|
||||
**required**, **type**: :ref:`sockaddr str <conf_value_sockaddr_str>`
|
||||
**required**, **type**: :ref:`env sockaddr str <conf_value_env_sockaddr_str>`
|
||||
|
||||
Set the listen socket address.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue