add net protect api methods

fix #8015
This commit is contained in:
Will Scott
2022-02-03 17:24:49 +01:00
parent 6ef0c382c3
commit 7247f8e41f
12 changed files with 322 additions and 21 deletions
+4
View File
@@ -51,6 +51,10 @@ type Net interface {
NetBlockRemove(ctx context.Context, acl NetBlockList) error //perm:admin
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read
NetProtectAdd(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectRemove(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectList(ctx context.Context) ([]peer.ID, 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