2020-08-20 23:50:14 +00:00
|
|
|
# NeoFS HTTP Gate
|
2019-11-07 17:29:29 +00:00
|
|
|
|
2020-08-20 23:50:14 +00:00
|
|
|
NeoFS HTTP Gate is example of tool that provides basic interactions with NeoFS.
|
|
|
|
You can download files from NeoFS Network using NeoFS Gate.
|
2019-11-07 17:29:29 +00:00
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2020-08-20 23:50:14 +00:00
|
|
|
```go get -u github.com/nspcc-dev/neofs-http-gate```
|
2019-11-07 17:29:29 +00:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
```
|
2019-12-13 16:02:48 +00:00
|
|
|
# Flags
|
2019-12-21 10:26:14 +00:00
|
|
|
--pprof enable pprof
|
|
|
|
--metrics enable prometheus
|
2019-12-13 16:02:48 +00:00
|
|
|
-h, --help show help
|
|
|
|
-v, --version show version
|
2019-12-17 15:34:04 +00:00
|
|
|
--key string "generated" to generate key, path to private key file, hex string or wif (default "generated")
|
2019-12-13 16:02:48 +00:00
|
|
|
--verbose debug gRPC connections
|
|
|
|
--request_timeout duration gRPC request timeout (default 5s)
|
|
|
|
--connect_timeout duration gRPC connect timeout (default 30s)
|
2020-08-20 23:50:14 +00:00
|
|
|
--listen_address string HTTP Gate listen address (default "0.0.0.0:8082")
|
2019-12-21 10:26:14 +00:00
|
|
|
-p, --peers stringArray NeoFS nodes
|
2019-12-13 16:02:48 +00:00
|
|
|
|
2019-11-07 17:29:29 +00:00
|
|
|
# Environments:
|
|
|
|
|
2020-12-02 09:20:21 +00:00
|
|
|
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
|
2019-11-07 17:29:29 +00:00
|
|
|
it pings the server to see if the transport is still alive.
|
2020-12-02 09:20:21 +00:00
|
|
|
HTTP_GW_KEEPALIVE_TIMEOUT=Duration - after having pinged for keepalive check, the client waits for a duration
|
2019-11-07 17:29:29 +00:00
|
|
|
of Timeout and if no activity is seen even after that the connection is closed
|
2020-12-02 09:20:21 +00:00
|
|
|
HTTP_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM=Bool - if true, client sends keepalive pings even with no active RPCs.
|
2019-11-07 17:29:29 +00:00
|
|
|
If false, when there are no active RPCs, Time and Timeout will be ignored and no keepalive pings will be sent.
|
2020-11-23 09:43:27 +00:00
|
|
|
|
2020-12-02 09:20:21 +00:00
|
|
|
Peers preset:
|
|
|
|
|
|
|
|
HTTP_GW_PEERS_[N]_ADDRESS = string
|
|
|
|
HTTP_GW_PEERS_[N]_WEIGHT = 0..1 (float)
|
|
|
|
```
|