Commit graph

7 commits

Author SHA1 Message Date
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
62c6bbd875
refactoring pool, replace zap.Duration with zap.Stringer 2020-02-25 18:35:46 +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
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
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