FrostFS HTTP Gateway
Find a file
2020-05-12 11:18:23 +03:00
.gitignore ignore blast benchmark config 2020-02-28 19:52:33 +03:00
.test.env add test environments 2020-02-28 19:45:00 +03:00
app.go routing: remove trailing slash 2020-05-12 11:18:23 +03:00
Dockerfile fixes for Dockerfile 2020-04-15 11:22:55 +03:00
go.mod errors: correct handling 404 2020-04-22 13:34:48 +03:00
go.sum modules: update to neofs-api 0.7.1 2020-04-22 13:16:58 +03:00
go_dev.mod fixes for dev version of go.mod 2020-02-28 20:11:20 +03:00
grace.go initial 2019-11-06 15:33:46 +03:00
health.go refactoring + moved to neofs-api-go 2020-03-31 11:37:10 +03:00
LICENSE.md NSPCC-587 Add License and Readme 2019-11-07 20:29:29 +03:00
logger.go used logger custom interface instead of grpclog.LoggerV2 2020-03-03 13:36:20 +03:00
main.go refactoring + moved to neofs-api-go 2020-03-31 11:37:10 +03:00
Makefile update makefile dev command 2020-02-29 13:25:22 +03:00
metrics.go added reusable metrics endpoints 2020-03-03 13:34:52 +03:00
misc.go Use object.FilenameHeader instead custom constant 2020-02-04 14:00:45 +03:00
pool.go refactoring + moved to neofs-api-go 2020-03-31 11:37:10 +03:00
pprof.go refactoring + moved to neofs-api-go 2020-03-31 11:37:10 +03:00
README.md NSPCC-762 Connection pool 2019-12-21 13:26:14 +03:00
receive.go errors: correct handling 404 2020-04-22 13:34:48 +03:00
settings.go update to new router 2020-04-15 11:10:42 +03:00

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.