diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index e985a794d..3f9d75433 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -1811,21 +1811,6 @@ func (mr *MockFullNodeMockRecorder) NetFindPeer(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetFindPeer", reflect.TypeOf((*MockFullNode)(nil).NetFindPeer), arg0, arg1) } -// NetLimit mocks base method. -func (m *MockFullNode) NetLimit(arg0 context.Context, arg1 string) (api.NetLimit, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetLimit", arg0, arg1) - ret0, _ := ret[0].(api.NetLimit) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// NetLimit indicates an expected call of NetLimit. -func (mr *MockFullNodeMockRecorder) NetLimit(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetLimit", reflect.TypeOf((*MockFullNode)(nil).NetLimit), arg0, arg1) -} - // NetPeerInfo mocks base method. func (m *MockFullNode) NetPeerInfo(arg0 context.Context, arg1 peer.ID) (*api.ExtendedPeerInfo, error) { m.ctrl.T.Helper() @@ -1871,35 +1856,6 @@ func (mr *MockFullNodeMockRecorder) NetPubsubScores(arg0 interface{}) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPubsubScores", reflect.TypeOf((*MockFullNode)(nil).NetPubsubScores), arg0) } -// NetSetLimit mocks base method. -func (m *MockFullNode) NetSetLimit(arg0 context.Context, arg1 string, arg2 api.NetLimit) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetSetLimit", arg0, arg1, arg2) - ret0, _ := ret[0].(error) - return ret0 -} - -// NetSetLimit indicates an expected call of NetSetLimit. -func (mr *MockFullNodeMockRecorder) NetSetLimit(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetSetLimit", reflect.TypeOf((*MockFullNode)(nil).NetSetLimit), arg0, arg1, arg2) -} - -// NetStat mocks base method. -func (m *MockFullNode) NetStat(arg0 context.Context, arg1 string) (api.NetStat, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetStat", arg0, arg1) - ret0, _ := ret[0].(api.NetStat) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// NetStat indicates an expected call of NetStat. -func (mr *MockFullNodeMockRecorder) NetStat(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetStat", reflect.TypeOf((*MockFullNode)(nil).NetStat), arg0, arg1) -} - // NodeStatus mocks base method. func (m *MockFullNode) NodeStatus(arg0 context.Context, arg1 bool) (api.NodeStatus, error) { m.ctrl.T.Helper() diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 25a1730af..f2bc95a90 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -587,17 +587,11 @@ type NetStruct struct { NetFindPeer func(p0 context.Context, p1 peer.ID) (peer.AddrInfo, error) `perm:"read"` - NetLimit func(p0 context.Context, p1 string) (NetLimit, error) `perm:"read"` - NetPeerInfo func(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) `perm:"read"` NetPeers func(p0 context.Context) ([]peer.AddrInfo, error) `perm:"read"` NetPubsubScores func(p0 context.Context) ([]PubsubScore, error) `perm:"read"` - - NetSetLimit func(p0 context.Context, p1 string, p2 NetLimit) error `perm:"admin"` - - NetStat func(p0 context.Context, p1 string) (NetStat, error) `perm:"read"` } } @@ -3637,17 +3631,6 @@ func (s *NetStub) NetFindPeer(p0 context.Context, p1 peer.ID) (peer.AddrInfo, er return *new(peer.AddrInfo), ErrNotSupported } -func (s *NetStruct) NetLimit(p0 context.Context, p1 string) (NetLimit, error) { - if s.Internal.NetLimit == nil { - return *new(NetLimit), ErrNotSupported - } - return s.Internal.NetLimit(p0, p1) -} - -func (s *NetStub) NetLimit(p0 context.Context, p1 string) (NetLimit, error) { - return *new(NetLimit), ErrNotSupported -} - func (s *NetStruct) NetPeerInfo(p0 context.Context, p1 peer.ID) (*ExtendedPeerInfo, error) { if s.Internal.NetPeerInfo == nil { return nil, ErrNotSupported @@ -3681,28 +3664,6 @@ func (s *NetStub) NetPubsubScores(p0 context.Context) ([]PubsubScore, error) { return *new([]PubsubScore), ErrNotSupported } -func (s *NetStruct) NetSetLimit(p0 context.Context, p1 string, p2 NetLimit) error { - if s.Internal.NetSetLimit == nil { - return ErrNotSupported - } - return s.Internal.NetSetLimit(p0, p1, p2) -} - -func (s *NetStub) NetSetLimit(p0 context.Context, p1 string, p2 NetLimit) error { - return ErrNotSupported -} - -func (s *NetStruct) NetStat(p0 context.Context, p1 string) (NetStat, error) { - if s.Internal.NetStat == nil { - return *new(NetStat), ErrNotSupported - } - return s.Internal.NetStat(p0, p1) -} - -func (s *NetStub) NetStat(p0 context.Context, p1 string) (NetStat, error) { - return *new(NetStat), ErrNotSupported -} - func (s *SignableStruct) Sign(p0 context.Context, p1 SignFunc) error { if s.Internal.Sign == nil { return ErrNotSupported diff --git a/api/v0api/v0mocks/mock_full.go b/api/v0api/v0mocks/mock_full.go index 26d795940..3e9caaee8 100644 --- a/api/v0api/v0mocks/mock_full.go +++ b/api/v0api/v0mocks/mock_full.go @@ -1724,21 +1724,6 @@ func (mr *MockFullNodeMockRecorder) NetFindPeer(arg0, arg1 interface{}) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetFindPeer", reflect.TypeOf((*MockFullNode)(nil).NetFindPeer), arg0, arg1) } -// NetLimit mocks base method. -func (m *MockFullNode) NetLimit(arg0 context.Context, arg1 string) (api.NetLimit, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetLimit", arg0, arg1) - ret0, _ := ret[0].(api.NetLimit) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// NetLimit indicates an expected call of NetLimit. -func (mr *MockFullNodeMockRecorder) NetLimit(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetLimit", reflect.TypeOf((*MockFullNode)(nil).NetLimit), arg0, arg1) -} - // NetPeerInfo mocks base method. func (m *MockFullNode) NetPeerInfo(arg0 context.Context, arg1 peer.ID) (*api.ExtendedPeerInfo, error) { m.ctrl.T.Helper() @@ -1784,35 +1769,6 @@ func (mr *MockFullNodeMockRecorder) NetPubsubScores(arg0 interface{}) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPubsubScores", reflect.TypeOf((*MockFullNode)(nil).NetPubsubScores), arg0) } -// NetSetLimit mocks base method. -func (m *MockFullNode) NetSetLimit(arg0 context.Context, arg1 string, arg2 api.NetLimit) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetSetLimit", arg0, arg1, arg2) - ret0, _ := ret[0].(error) - return ret0 -} - -// NetSetLimit indicates an expected call of NetSetLimit. -func (mr *MockFullNodeMockRecorder) NetSetLimit(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetSetLimit", reflect.TypeOf((*MockFullNode)(nil).NetSetLimit), arg0, arg1, arg2) -} - -// NetStat mocks base method. -func (m *MockFullNode) NetStat(arg0 context.Context, arg1 string) (api.NetStat, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NetStat", arg0, arg1) - ret0, _ := ret[0].(api.NetStat) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// NetStat indicates an expected call of NetStat. -func (mr *MockFullNodeMockRecorder) NetStat(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetStat", reflect.TypeOf((*MockFullNode)(nil).NetStat), arg0, arg1) -} - // PaychAllocateLane mocks base method. func (m *MockFullNode) PaychAllocateLane(arg0 context.Context, arg1 address.Address) (uint64, error) { m.ctrl.T.Helper() diff --git a/documentation/en/api-v0-methods-miner.md b/documentation/en/api-v0-methods-miner.md index a84f89842..1c3bbb5b1 100644 --- a/documentation/en/api-v0-methods-miner.md +++ b/documentation/en/api-v0-methods-miner.md @@ -81,12 +81,9 @@ * [NetConnectedness](#NetConnectedness) * [NetDisconnect](#NetDisconnect) * [NetFindPeer](#NetFindPeer) - * [NetLimit](#NetLimit) * [NetPeerInfo](#NetPeerInfo) * [NetPeers](#NetPeers) * [NetPubsubScores](#NetPubsubScores) - * [NetSetLimit](#NetSetLimit) - * [NetStat](#NetStat) * [Pieces](#Pieces) * [PiecesGetCIDInfo](#PiecesGetCIDInfo) * [PiecesGetPieceInfo](#PiecesGetPieceInfo) @@ -1706,32 +1703,6 @@ Response: } ``` -### NetLimit - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 -} -``` - ### NetPeerInfo @@ -1817,94 +1788,6 @@ Response: ] ``` -### NetSetLimit - - -Perms: admin - -Inputs: -```json -[ - "string value", - { - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 - } -] -``` - -Response: `{}` - -### NetStat - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Services": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Protocols": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Peers": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - } -} -``` - ## Pieces diff --git a/documentation/en/api-v0-methods.md b/documentation/en/api-v0-methods.md index 883d4d274..88c4d8187 100644 --- a/documentation/en/api-v0-methods.md +++ b/documentation/en/api-v0-methods.md @@ -128,12 +128,9 @@ * [NetConnectedness](#NetConnectedness) * [NetDisconnect](#NetDisconnect) * [NetFindPeer](#NetFindPeer) - * [NetLimit](#NetLimit) * [NetPeerInfo](#NetPeerInfo) * [NetPeers](#NetPeers) * [NetPubsubScores](#NetPubsubScores) - * [NetSetLimit](#NetSetLimit) - * [NetStat](#NetStat) * [Paych](#Paych) * [PaychAllocateLane](#PaychAllocateLane) * [PaychAvailableFunds](#PaychAvailableFunds) @@ -3824,32 +3821,6 @@ Response: } ``` -### NetLimit - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 -} -``` - ### NetPeerInfo @@ -3935,94 +3906,6 @@ Response: ] ``` -### NetSetLimit - - -Perms: admin - -Inputs: -```json -[ - "string value", - { - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 - } -] -``` - -Response: `{}` - -### NetStat - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Services": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Protocols": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Peers": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - } -} -``` - ## Paych The Paych methods are for interacting with and managing payment channels diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index a5fdd9994..7d5f4665e 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -134,12 +134,9 @@ * [NetConnectedness](#NetConnectedness) * [NetDisconnect](#NetDisconnect) * [NetFindPeer](#NetFindPeer) - * [NetLimit](#NetLimit) * [NetPeerInfo](#NetPeerInfo) * [NetPeers](#NetPeers) * [NetPubsubScores](#NetPubsubScores) - * [NetSetLimit](#NetSetLimit) - * [NetStat](#NetStat) * [Node](#Node) * [NodeStatus](#NodeStatus) * [Paych](#Paych) @@ -4185,32 +4182,6 @@ Response: } ``` -### NetLimit - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 -} -``` - ### NetPeerInfo @@ -4296,94 +4267,6 @@ Response: ] ``` -### NetSetLimit - - -Perms: admin - -Inputs: -```json -[ - "string value", - { - "Memory": 123, - "Streams": 3, - "StreamsInbound": 1, - "StreamsOutbound": 2, - "Conns": 4, - "ConnsInbound": 3, - "ConnsOutbound": 4, - "FD": 5 - } -] -``` - -Response: `{}` - -### NetStat - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, - "Memory": 9 - }, - "Services": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Protocols": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - }, - "Peers": { - "abc": { - "NumStreamsInbound": 1, - "NumStreamsOutbound": 2, - "NumConnsInbound": 3, - "NumConnsOutbound": 4, - "NumFD": 5, - "Memory": 123 - } - } -} -``` - ## Node These methods are general node management and status commands diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index bce1f1c47..ab0622ab1 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -1160,8 +1160,6 @@ COMMANDS: reachability Print information about reachability from the internet bandwidth Print bandwidth usage information block Manage network connection gating rules - stat Report resource usage for a scope - limit Get or set resource limits for a scope help, h Shows a list of commands or help for one command OPTIONS: @@ -1430,58 +1428,6 @@ OPTIONS: ``` -### lotus-miner net stat -``` -NAME: - lotus-miner net stat - Report resource usage for a scope - -USAGE: - lotus-miner net stat [command options] scope - -DESCRIPTION: - Report resource usage for a scope. - - The scope can be one of the following: - - system -- reports the system aggregate resource usage. - - transient -- reports the transient resource usage. - - svc: -- reports the resource usage of a specific service. - - proto: -- reports the resource usage of a specific protocol. - - peer: -- reports the resource usage of a specific peer. - - all -- reports the resource usage for all currently active scopes. - - -OPTIONS: - --help, -h show help (default: false) - -``` - -### lotus-miner net limit -``` -NAME: - lotus-miner net limit - Get or set resource limits for a scope - -USAGE: - lotus-miner net limit [command options] scope [limit] - -DESCRIPTION: - Get or set resource limits for a scope. - - The scope can be one of the following: - - system -- reports the system aggregate resource usage. - - transient -- reports the transient resource usage. - - svc: -- reports the resource usage of a specific service. - - proto: -- reports the resource usage of a specific protocol. - - peer: -- reports the resource usage of a specific peer. - - The limit is json-formatted, with the same structure as the limits file. - - -OPTIONS: - --set set the limit for a scope (default: false) - --help, -h show help (default: false) - -``` - ## lotus-miner pieces ``` NAME: diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index a5fd6deb9..b69ae2cac 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -2616,8 +2616,6 @@ COMMANDS: reachability Print information about reachability from the internet bandwidth Print bandwidth usage information block Manage network connection gating rules - stat Report resource usage for a scope - limit Get or set resource limits for a scope help, h Shows a list of commands or help for one command OPTIONS: @@ -2886,58 +2884,6 @@ OPTIONS: ``` -### lotus net stat -``` -NAME: - lotus net stat - Report resource usage for a scope - -USAGE: - lotus net stat [command options] scope - -DESCRIPTION: - Report resource usage for a scope. - - The scope can be one of the following: - - system -- reports the system aggregate resource usage. - - transient -- reports the transient resource usage. - - svc: -- reports the resource usage of a specific service. - - proto: -- reports the resource usage of a specific protocol. - - peer: -- reports the resource usage of a specific peer. - - all -- reports the resource usage for all currently active scopes. - - -OPTIONS: - --help, -h show help (default: false) - -``` - -### lotus net limit -``` -NAME: - lotus net limit - Get or set resource limits for a scope - -USAGE: - lotus net limit [command options] scope [limit] - -DESCRIPTION: - Get or set resource limits for a scope. - - The scope can be one of the following: - - system -- reports the system aggregate resource usage. - - transient -- reports the transient resource usage. - - svc: -- reports the resource usage of a specific service. - - proto: -- reports the resource usage of a specific protocol. - - peer: -- reports the resource usage of a specific peer. - - The limit is json-formatted, with the same structure as the limits file. - - -OPTIONS: - --set set the limit for a scope (default: false) - --help, -h show help (default: false) - -``` - ## lotus sync ``` NAME: