forked from TrueCloudLab/frostfs-http-gw
FrostFS HTTP Gateway
6abd79aa44
- github.com/nspcc-dev/neofs-api v0.4.1 // v0.4.0 => v0.4.1 - github.com/nspcc-dev/neofs-crypto v0.3.0 // v0.2.3 => v0.3.0 - github.com/prometheus/client_golang v1.5.0 // v1.4.1 => v1.5.0 |
||
---|---|---|
.gitignore | ||
.test.env | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
go_dev.mod | ||
grace.go | ||
health.go | ||
LICENSE.md | ||
logger.go | ||
main.go | ||
Makefile | ||
metrics.go | ||
misc.go | ||
pool.go | ||
pprof.go | ||
README.md | ||
receive.go | ||
settings.go |
NeoFS HTTP Gateway
NeoFS HTTP Gateway is example of tool that provides basic interactions with NeoFS. You can download files from NeoFS Network using NeoFS Gateway.
Install
go get -u github.com/nspcc-dev/neofs-gw
Configuration
# Flags
--pprof enable pprof
--metrics enable prometheus
-h, --help show help
-v, --version show version
--key string "generated" to generate key, path to private key file, hex string or wif (default "generated")
--verbose debug gRPC connections
--request_timeout duration gRPC request timeout (default 5s)
--connect_timeout duration gRPC connect timeout (default 30s)
--listen_address string HTTP Gateway listen address (default "0.0.0.0:8082")
-p, --peers stringArray NeoFS nodes
# Environments:
GW_KEY=stirng - "generated" to generate key, path to private key file, hex string or wif (default "generated")
GW_REQUEST_TIMEOUT=Duration - timeout for request
GW_CONNECT_TIMEOUT=Duration - timeout for connection
GW_LISTEN_ADDRESS=host:port - address to listen connections
GW_PEERS_<X>_ADDRESS=host:port - address of NeoFS Node
GW_PEERS_<X>_WEIGHT=float - weight of NeoFS Node
GW_PPROF=bool - enable/disable pprof (/debug/pprof)
GW_METRICS=bool - enable/disable prometheus metrics endpoint (/metrics)
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.
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
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.