Commit graph

25 commits

Author SHA1 Message Date
Roman Khimov
3173c70eb6 settings: fix godot warnings
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2021-05-13 18:57:42 +03:00
Roman Khimov
491ae13190 app: add support for TLS key/cert options
Run in TLS mode if anything is specified.
2021-04-15 20:24:49 +03:00
Roman Khimov
f019c97ce8 connections: normalize weights, make config a bit more human-oriented
Current scheme requires people to calculate exact percentages for their
nodes. People are bad with pecentage calculations and it's really inconvenient
if you have more than 3-4 nodes. What I'd like to have is ability to specify
weights like weights, not percentages:
  .._0_WEIGHT=3
  .._1_WEIGHT=1
  .._2_WEIGHT=1

and let the gateway calculate things for me.
2021-04-15 09:45:43 +03:00
Roman Khimov
c06a3137e5 app: add support for ephemeral keys 2021-04-14 23:52:59 +03:00
Pavel Korotkov
62a03251ce Add connection pool implementation (part 1)
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00
Pavel Korotkov
4c96885a42 [#19] Add a version with no cdn-sdk deps
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00
Evgeniy Kulikov
3b8bf3017d
Migrate to fasthttp v1.20.0
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2021-02-12 18:48:52 +03:00
Evgeniy Kulikov
a428a0b1b3
fix conflicts 2021-02-12 15:24:52 +03:00
Evgeniy Kulikov
cbaf9e6142
Fixes after review
After discussion, we decided to simplify attribute translation for now. Full translation requires support for UTF-8 values encoded according to RFC 8187/7230, this can be clarified and implemented in further PRs.

1. Remove translation tables
2. Use simple translation rules only, for now ignoring UTF-8 keys and values

- `X-Attribute-NEOFS-` prefixed headers considered well-known system attributes
- System Attribute key is uppercased
- System Attribute key's `-` translates to `_`
- `X-Attribute-` prefixed headers considered regular object attributes
- Normal attribute key is a result of http header prefix trimming
- Value string should be left as is, for now

```
HTTP:
X-Attribute-NEOFS-Expiration-Epoch: 123
X-Attribute-FileName: cat.jpg

NeoFS:
__NEOFS__EXPIRATION_EPOCH: "123"
FileName: "cat.jpg"
```

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2021-02-12 15:21:53 +03:00
Evgeniy Kulikov
3cbd4dbd09
Fixes after review
- Maybe it could be rephrased to "attribute name prefixed with X-Attribute-"
- Maybe it worth renaming to userAttributeHeaderPrefix
- Requirement for having only one file uploaded at a time has to be reflected in documentation.
- Maybe this should be reflected in doc
- I'm not sure if missing timestamp attribute should be forced on gateway level. Normally it should be set by app and there should be a way not to set it.

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2021-02-12 15:21:53 +03:00
Evgeniy Kulikov
462de45e12
Added POST method to upload files into NeoFS through HTTP Gate
- Updated README
- Added method to upload files into NeoFS
- HTTP Upload Header Filter loaded from settings
- Added `HeaderFilter` that filters headers (object attributes)

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2021-02-12 15:21:53 +03:00
Evgeniy Kulikov
65a5a3f9fc
Update README
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-12-02 12:25:18 +03:00
Evgeniy Kulikov
8bd210d67e
Use constant settings keys
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-12-02 12:25:18 +03:00
Evgeniy Kulikov
01f13ef210
Prepare to release
- set output for flag set
- change env prefix for all environments
- migrate to CDN SDK release v0.1.0

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-12-02 12:25:18 +03:00
Evgeniy Kulikov
31186382e8
Change ENV prefix
TODO should be replaced with HTTP_GW before release

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-11-27 18:18:53 +03:00
Evgeniy Kulikov
6226729e38
Migrate to CDN SDK 2020-11-10 14:46:28 +03:00
Evgeniy Kulikov
ea4710eaba
update to new router 2020-04-15 11:10:42 +03:00
Evgeniy Kulikov
164b0870de
refactoring + moved to neofs-api-go 2020-03-31 11:37:10 +03:00
Evgeniy Kulikov
6e917c1982
move rebalance timer to settings 2020-02-27 13:09:27 +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
fbfab8cae7
Add state.HealthCheck to isActive 2020-02-13 17:33:12 +03:00
Evgeniy Kulikov
590444459d
Migrate to NeoFS API 2020-02-04 13:35:25 +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
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