Commit graph

397 commits

Author SHA1 Message Date
Evgeniy Kulikov
8aef59cdbd
refactoring application: use fasthttp instead echo, add healthcheck handlers, run web server immidiently, close pool connections when stop 2020-02-28 20:07:50 +03:00
Evgeniy Kulikov
7790684726
refactoring connectionpool: add healthcheck, move getConnection and first call reBalance outside constructor 2020-02-28 20:05:25 +03:00
Evgeniy Kulikov
35e2378afc
refactoring receive file handler: use fasthttp instead echo 2020-02-28 20:03:56 +03:00
Evgeniy Kulikov
437133e280
add fasthttp pprof handler 2020-02-28 19:56:50 +03:00
Evgeniy Kulikov
c6a06ca709
add fasthttp metrics handler 2020-02-28 19:56:22 +03:00
Evgeniy Kulikov
d6df78974e
ignore blast benchmark config 2020-02-28 19:52:33 +03:00
Evgeniy Kulikov
dd213b0c41
update makefile commands: dev, image, version 2020-02-28 19:51:49 +03:00
Evgeniy Kulikov
a584012d50
update makefile commands: dev, image, version 2020-02-28 19:50:54 +03:00
Evgeniy Kulikov
0ab7893337
add test environments 2020-02-28 19:45:00 +03:00
Evgeniy Kulikov
cee4e6239f
add Println and Printf for zapLogger 2020-02-28 19:44:32 +03:00
Evgeniy Kulikov
772314d156
update dependencies 2020-02-28 19:43:39 +03:00
Evgeniy Kulikov
b8dc1097fb
update dependencies 2020-02-28 19:43:25 +03:00
Evgeniy Kulikov
f867fff1d7
ignore test script 2020-02-27 13:09:53 +03:00
Evgeniy Kulikov
6e917c1982
move rebalance timer to settings 2020-02-27 13:09:27 +03:00
Evgeniy Kulikov
c290e4178a
fix typo 2020-02-27 12:51:11 +03:00
Evgeniy Kulikov
2590784e3a
add replacements for debug 2020-02-25 18:41:19 +03:00
Evgeniy Kulikov
51574e8274
add more debug information to build 2020-02-25 18:39:35 +03:00
Evgeniy Kulikov
4715468f3a
add grpc version to image, add command to build gw with multiple grpc versions 2020-02-25 18:38:47 +03:00
Evgeniy Kulikov
62c6bbd875
refactoring pool, replace zap.Duration with zap.Stringer 2020-02-25 18:35:46 +03:00
Evgeniy Kulikov
cf61136da5
small refactoring 2020-02-25 13:31:20 +03:00
Evgeniy Kulikov
5512bd0b2f
debugging neofs-api 2020-02-20 17:36:44 +03:00
Evgeniy Kulikov
c3a23e9115
debugging gRPC 2020-02-20 17:26:37 +03:00
Evgeniy Kulikov
f86115bf6e
go.sum go.uber.org/atomic v1.5.0 2020-02-19 15:48:53 +03:00
Evgeniy Kulikov
75113f8195
Refactoring connection pool
- replace RWMutex with Mutex
- conns now contains `map[int32][]*node`
- add index field to node struct
- add usedAt field to node struct
- `New` don't store current connection twice
- writes `used_at` of connection into the log
- we check that conn is alive and, that connection used not a long time ago, otherwise, close it
- `getConnection` reset current connection and index on errors
-  `IsAlive` now is a method of `Pool`
-  `IsAlive` creates context with timeout for every health check call of node
2020-02-19 13:55:42 +03:00
Evgeniy Kulikov
65a2da6995
Add constants with default values
- default values constants
- add conn_ttl `GW_CONN_TTL=duration` (gRPC connection time to live)
2020-02-19 13:47:21 +03:00
Evgeniy Kulikov
667a98d22f
Ignore log files 2020-02-19 13:45:09 +03:00
Evgeniy Kulikov
c4963f45bd
use timer instead of ticker 2020-02-14 14:35:35 +03:00
Evgeniy Kulikov
468cf49126
don't panic on http.ErrServerClosed 2020-02-14 13:12:36 +03:00
Evgeniy Kulikov
307f008dac
log elapsed time when could not receive object 2020-02-14 13:12:36 +03:00
Evgeniy Kulikov
01e152774f
refactor reBalance and isAlive 2020-02-14 13:12:36 +03:00
Evgeniy Kulikov
17768b5bfe
set ttl to HealthRequest 2020-02-14 13:12:29 +03:00
Evgeniy Kulikov
fbfab8cae7
Add state.HealthCheck to isActive 2020-02-13 17:33:12 +03:00
Evgeniy Kulikov
b8a6af43aa
update go.sum 2020-02-07 18:06:19 +03:00
Evgeniy Kulikov
f14401c0c0
Update dependencies
- github.com/labstack/echo/v4 `v4.1.11 => v4.1.14`
- github.com/nspcc-dev/neofs-api `v0.2.14 => v0.3.1`
- github.com/pkg/errors `v0.8.1 => v0.9.1`
- github.com/prometheus/client_golang `v1.2.1 => v1.4.1`
- github.com/spf13/viper `v1.6.1 => v1.6.2`
- google.golang.org/grpc `v1.25.1 => v1.27.1`
2020-02-07 18:04:02 +03:00
Evgeniy Kulikov
1542a01924
Use path.Base because hdr.Value can be something like /path/to/filename.ext 2020-02-04 14:02:29 +03:00
Evgeniy Kulikov
53244fcaf3
Use object.FilenameHeader instead custom constant 2020-02-04 14:00:45 +03:00
Evgeniy Kulikov
461a4acea0
Update to NeoFS API v0.2.14 2020-02-04 14:00:06 +03:00
Evgeniy Kulikov
590444459d
Migrate to NeoFS API 2020-02-04 13:35:25 +03:00
alexvanin
d807ede7c7 dep: Update neofs-proto to v0.2.11
Object get and head requests have new `raw` field now.
2020-01-22 17:24:15 +03:00
Evgeniy Kulikov
746946290c
NSPCC-762 Connection pool
- implement connection pool
- wait until container creates
- refactoring gw service
- add config option to enable prometheus and pprof
- update neofs-proto to v0.2.8
2019-12-21 13:26:14 +03:00
Evgeniy Kulikov
39279e4c5f
NSPCC-786 Rename gen => generated 2019-12-17 18:34:04 +03:00
Evgeniy Kulikov
798b9c9646
docker: update dockerfile and make command 2019-12-13 19:18:45 +03:00
Evgeniy Kulikov
97d1a99f58
NSPCC-493 Separate repository for NeoFS GW
- Update dependencies
- Update README (configuration: flags section)
- Add gRPC logger and flag to enable gRPC connection debugging
- Refactored settings (add flags, use defaults instead of yaml representation)
2019-12-13 19:09:14 +03:00
Evgeniy Kulikov
2bebf38a18
update go.sum 2019-11-19 16:23:59 +03:00
Evgeniy Kulikov
3f8e696433
update proto / crypto / makefile 2019-11-18 19:59:59 +03:00
Evgeniy Kulikov
99ed41b905
NSPCC-587 Add License and Readme 2019-11-07 20:29:29 +03:00
Evgeniy Kulikov
b4ac08d341
initial 2019-11-06 15:33:46 +03:00