[#19] Add a version with no cdn-sdk deps

Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
This commit is contained in:
Pavel Korotkov 2021-03-31 01:46:33 +03:00 committed by Pavel Korotkov
parent cdab794d62
commit 4c96885a42
20 changed files with 930 additions and 266 deletions

View file

@ -34,7 +34,8 @@ NeoFS HTTP Gate is example of tool that provides basic interactions with NeoFS.
## Configuration
```
# Flags
# Flags:
--pprof enable pprof
--metrics enable prometheus
-h, --help show help
@ -43,35 +44,36 @@ NeoFS HTTP Gate is example of tool that provides basic interactions with NeoFS.
--verbose debug gRPC connections
--request_timeout duration gRPC request timeout (default 5s)
--connect_timeout duration gRPC connect timeout (default 30s)
--listen_address string HTTP Gate listen address (default "0.0.0.0:8082")
--listen_address string HTTP gate's listen address (default "0.0.0.0:8082")
-p, --peers stringArray NeoFS nodes
# Environments:
HTTP_GW_KEY=string - "generated" to generate key, path to private key file, hex string or wif (default "generated")
HTTP_GW_CONNECT_TIMEOUT=Duration - timeout for connection
HTTP_GW_REQUEST_TIMEOUT=Duration - timeout for request
HTTP_GW_REBALANCE_TIMER=Duration - time between connections checks
HTTP_GW_LISTEN_ADDRESS=host:port - address to listen connections
HTTP_GW_PEERS_<X>_ADDRESS=host:port - address of NeoFS Node
HTTP_GW_PEERS_<X>_WEIGHT=float - weight of NeoFS Node
HTTP_GW_PPROF=bool - enable/disable pprof (/debug/pprof)
HTTP_GW_METRICS=bool - enable/disable prometheus metrics endpoint (/metrics)
HTTP_GW_LOGGER_FORMAT=string - logger format
HTTP_GW_LOGGER_LEVEL=string - logger level
HTTP_GW_LOGGER_NO_CALLER=bool - logger don't show caller
HTTP_GW_LOGGER_NO_DISCLAIMER=bool - logger don't show application name/version
HTTP_GW_LOGGER_SAMPLING_INITIAL=int - logger sampling initial
HTTP_GW_LOGGER_SAMPLING_THEREAFTER=int - logger sampling thereafter
HTTP_GW_LOGGER_TRACE_LEVEL=string - logger show trace on level
HTTP_GW_KEEPALIVE_TIME=Duration - аfter a duration of this time if the client doesn't see any activity
it pings the server to see if the transport is still alive.
HTTP_GW_KEEPALIVE_TIMEOUT=Duration - after having pinged for keepalive check, the client waits for a duration
of Timeout and if no activity is seen even after that the connection is closed
HTTP_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM=Bool - if true, client sends keepalive pings even with no active RPCs.
If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent.
HTTP_GW_UPLOAD_HEADER_USE_DEFAULT_TIMESTAMP=bool - enable/disable adding current timestamp attribute when object uploads
HTTP_GW_KEY=string - Path to private key file, hex string or wif string
HTTP_GW_CONNECT_TIMEOUT=duration - Timeout for connection
HTTP_GW_REQUEST_TIMEOUT=duration - Timeout for request
HTTP_GW_REBALANCE_TIMER=duration - Time between connections checks
HTTP_GW_LISTEN_ADDRESS=host:port - Address to listen connections
HTTP_GW_PEERS_<X>_ADDRESS=host:port - Address of NeoFS Node
HTTP_GW_PEERS_<X>_WEIGHT=float - Weight of NeoFS Node
HTTP_GW_PPROF=bool - Enable/disable pprof (/debug/pprof)
HTTP_GW_METRICS=bool - Enable/disable prometheus metrics endpoint (/metrics)
HTTP_GW_LOGGER_FORMAT=string - Logger format
HTTP_GW_LOGGER_LEVEL=string - Logger level
HTTP_GW_LOGGER_NO_CALLER=bool - Logger don't show caller
HTTP_GW_LOGGER_NO_DISCLAIMER=bool - Logger don't show application name/version
HTTP_GW_LOGGER_SAMPLING_INITIAL=int - Logger sampling initial
HTTP_GW_LOGGER_SAMPLING_THEREAFTER=int - Logger sampling thereafter
HTTP_GW_LOGGER_TRACE_LEVEL=string - Logger show trace on level
HTTP_GW_KEEPALIVE_TIME=duration - After a duration of this time if the client sees no activity
it pings the server to see if the transport is still alive
HTTP_GW_KEEPALIVE_TIMEOUT=duration - After having pinged for keepalive check, the client waits for a duration
of Timeout and if no activity is seen even after that the connection
is closed
HTTP_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM=bool - If true, client sends keepalive pings even with no active RPCs.
If false, when there are no active RPCs, Time and Timeout will be
ignored and no keepalive pings will be sent
HTTP_GW_UPLOAD_HEADER_USE_DEFAULT_TIMESTAMP=bool - Enable/disable adding current timestamp attribute when object uploads
HTTP_GW_WEB_READ_BUFFER_SIZE=4096 - per-connection buffer size for requests' reading
HTTP_GW_WEB_READ_TIMEOUT=15s - an amount of time allowed to read the full request including body
@ -84,6 +86,6 @@ HTTP_GW_WEB_MAX_REQUEST_BODY_SIZE=4194304 - maximum request body size, server r
Peers preset:
HTTP_GW_PEERS_[N]_ADDRESS = string
HTTP_GW_PEERS_[N]_WEIGHT = 0..1 (float)
```
HTTP_GW_PEERS_<N>_ADDRESS = string
HTTP_GW_PEERS_<N>_WEIGHT = 0..1 (float)
```