Revert "add resource manager Net(Set)Limit api"

This reverts commit 554848fe6b.
This commit is contained in:
Aayush
2022-03-02 15:39:21 -05:00
parent bac17061d4
commit b8747e3afc
3 changed files with 3 additions and 188 deletions
+1 -3
View File
@@ -52,9 +52,7 @@ type Net interface {
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read
// ResourceManager API
NetStat(ctx context.Context, scope string) (NetStat, error) //perm:read
NetLimit(ctx context.Context, scope string) (NetLimit, error) //perm:read
NetSetLimit(ctx context.Context, scope string, limit NetLimit) error //perm:admin
NetStat(ctx context.Context, scope string) (NetStat, error) //perm:read
// ID returns peerID of libp2p node backing this API
ID(context.Context) (peer.ID, error) //perm:read
+1 -15
View File
@@ -135,21 +135,7 @@ type NetStat struct {
Transient *network.ScopeStat `json:",omitempty"`
Services map[string]network.ScopeStat `json:",omitempty"`
Protocols map[string]network.ScopeStat `json:",omitempty"`
Peers map[string]network.ScopeStat `json:",omitempty"`
}
type NetLimit struct {
Dynamic bool `json:",omitempty"`
// set if Dynamic is false
Memory int64 `json:",omitempty"`
// set if Dynamic is true
MemoryFraction float64 `json:",omitempty"`
MinMemory int64 `json:",omitempty"`
MaxMemory int64 `json:",omitempty"`
Streams, StreamsInbound, StreamsOutbound int
Conns, ConnsInbound, ConnsOutbound int
FD int
Peers map[string]network.ScopeStat
}
type ExtendedPeerInfo struct {