feat: persist limits to Swarm.ResourceMgr.Limits (#8901)
* feat: persist limit changes to config
This changes the "ipfs swarm limit" command so that when limit changes
are applied via the command line, they are persisted to the repo
config, so that they remain in effect when the daemon restarts.
Any existing limit.json can be dropped into the IPFS config easily
using something like:
cat ~/.ipfs/config | jq ".Swarm.ResourceMgr.Limits = $(cat limit.json)" | sponge ~/.ipfs/config
This also upgrades to Resource Manager v0.3.0, which exports the config
schema so that we don't have to maintain our own copy of it.
Co-authored-by:
Marcin Rataj <lidel@lidel.org>
Showing
- config/swarm.go 4 additions, 42 deletionsconfig/swarm.go
- core/commands/swarm.go 4 additions, 4 deletionscore/commands/swarm.go
- core/node/libp2p/rcmgr.go 69 additions, 37 deletionscore/node/libp2p/rcmgr.go
- go.mod 1 addition, 1 deletiongo.mod
- go.sum 2 additions, 1 deletiongo.sum
- test/sharness/t0139-swarm-rcmgr.sh 118 additions, 29 deletionstest/sharness/t0139-swarm-rcmgr.sh
Loading
Please register or sign in to comment