-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: rcmgr: Change LimitConfig to use LimitVal type (#2000)
* rcmgr: Change LimitConfig to use LimitVal type * Nits * Remove DefaultReifiedLimits * Use pointers for optional ResourceLimits * Reify a nil pointer with defaults * Fix maxints * Move helper * Return nil if everything is default * Check for nil pointer * Change terms * Add IsDefault helper * Use values instead of pointers for PartialLimitConfig * Remove references to reify * Unmarshal 0 limits as block all * ResourceLimits can build on Limits interface objs * Convert max int to unlimited * Remove ToLimitConfigWithDefaults * Rename to ToPartialLimitConfig
- Loading branch information
Showing
8 changed files
with
956 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
p2p/host/resource-manager/limit_config_test.backwards-compat.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"System": { | ||
"Memory": 65536, | ||
"Conns": 16, | ||
"ConnsInbound": 8, | ||
"ConnsOutbound": 16, | ||
"FD": 16 | ||
}, | ||
"ServiceDefault": { | ||
"Memory": 8765 | ||
}, | ||
"Service": { | ||
"A": { | ||
"Memory": 8192 | ||
}, | ||
"B": {} | ||
}, | ||
"ServicePeerDefault": { | ||
"Memory": 2048 | ||
}, | ||
"ServicePeer": { | ||
"A": { | ||
"Memory": 4096 | ||
} | ||
}, | ||
"ProtocolDefault": { | ||
"Memory": 2048 | ||
}, | ||
"ProtocolPeerDefault": { | ||
"Memory": 1024 | ||
}, | ||
"Protocol": { | ||
"/A": { | ||
"Memory": 8192 | ||
} | ||
}, | ||
"PeerDefault": { | ||
"Memory": 4096 | ||
}, | ||
"Peer": { | ||
"12D3KooWPFH2Bx2tPfw6RLxN8k2wh47GRXgkt9yrAHU37zFwHWzS": { | ||
"Memory": 4097 | ||
} | ||
} | ||
} |
Oops, something went wrong.