forked from TrueCloudLab/frostfs-api
[#34] Add netmap package
Introduce netmap package to repository. Also as initial use, added container storage rules message netmap.PlacementRule. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
44ec19962a
commit
f60273beb9
2 changed files with 202 additions and 0 deletions
56
netmap/types.proto
Normal file
56
netmap/types.proto
Normal file
|
@ -0,0 +1,56 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package netmap;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
|
||||
option csharp_namespace = "NeoFS.API.Netmap";
|
||||
|
||||
message PlacementRule {
|
||||
uint32 ReplFactor = 1;
|
||||
|
||||
message SFGroup {
|
||||
message Filter {
|
||||
string Key = 1;
|
||||
|
||||
message SimpleFilters {
|
||||
repeated SimpleFilter Filters = 1;
|
||||
}
|
||||
|
||||
message SimpleFilter {
|
||||
enum Operation {
|
||||
NP = 0;
|
||||
EQ = 1;
|
||||
NE = 2;
|
||||
GT = 3;
|
||||
GE = 4;
|
||||
LT = 5;
|
||||
LE = 6;
|
||||
OR = 7;
|
||||
AND = 8;
|
||||
}
|
||||
|
||||
Operation Op = 1;
|
||||
|
||||
oneof Args {
|
||||
string Value = 2;
|
||||
SimpleFilters FArgs = 3;
|
||||
}
|
||||
}
|
||||
|
||||
SimpleFilter F = 2;
|
||||
}
|
||||
|
||||
repeated Filter Filters = 1;
|
||||
|
||||
message Selector {
|
||||
uint32 Count = 1;
|
||||
string Key = 2;
|
||||
}
|
||||
|
||||
repeated Selector Selectors = 2;
|
||||
|
||||
repeated uint32 Exclude = 3;
|
||||
}
|
||||
|
||||
repeated SFGroup SFGroups = 2;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue