Implement LRU cache of eACL tables read from sidechain. Use it as a netmap
storage in neofs-node app. Current cache size is set to 10 (constant).
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Application should support several NEO endpoints so it can
switch between different RPC nodes when they fail. Application
iterates over endpoints in random order so the default list of
endpoints distribute workload kinda uniformly.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
As in #72 storage application should behave the same way at remote
RPC node failures. The simplest way is to restart application. Later
we can reinitialize it without downtime.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Default values for capacity and price will be 0, so storage node
won't be present in placement. Add these attributes if they are
not explicitly set up by user config.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Well-known attributes set up with explicit configuration
values, other attributes set up from chain of attributes.
Chain of attributes is a string, that contains keys-value pairs,
divided by semicolon. Pairs itself divided by slash.
E.g. "StorageType:HDD/RPM:7200"
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
To run storage node at dev-env environment it should have
configurable parameters. To keep `cfg` structures we can
read configuration from env and yml config file with viper
and parse values such as script hashes, fees, keys into
`cfg` structures.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>