2020-08-05 21:52:40 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package netmap;
|
|
|
|
|
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
|
|
|
|
option csharp_namespace = "NeoFS.API.Netmap";
|
|
|
|
|
|
|
|
message PlacementRule {
|
2020-08-06 21:59:50 +00:00
|
|
|
uint32 repl_factor = 1;
|
2020-08-05 21:52:40 +00:00
|
|
|
|
|
|
|
message SFGroup {
|
|
|
|
message Filter {
|
2020-08-06 21:59:50 +00:00
|
|
|
string key = 1;
|
2020-08-05 21:52:40 +00:00
|
|
|
|
|
|
|
message SimpleFilters {
|
2020-08-06 21:59:50 +00:00
|
|
|
repeated SimpleFilter filters = 1;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SimpleFilter {
|
|
|
|
enum Operation {
|
|
|
|
NP = 0;
|
|
|
|
EQ = 1;
|
|
|
|
NE = 2;
|
|
|
|
GT = 3;
|
|
|
|
GE = 4;
|
|
|
|
LT = 5;
|
|
|
|
LE = 6;
|
|
|
|
OR = 7;
|
|
|
|
AND = 8;
|
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
Operation op = 1;
|
2020-08-05 21:52:40 +00:00
|
|
|
|
|
|
|
oneof Args {
|
2020-08-06 21:59:50 +00:00
|
|
|
string value = 2;
|
|
|
|
SimpleFilters f_args = 3;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
SimpleFilter f = 2;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
repeated Filter filters = 1;
|
2020-08-05 21:52:40 +00:00
|
|
|
|
|
|
|
message Selector {
|
2020-08-06 21:59:50 +00:00
|
|
|
uint32 count = 1;
|
|
|
|
string key = 2;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
repeated Selector selectors = 2;
|
2020-08-05 21:52:40 +00:00
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
repeated uint32 exclude = 3;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
repeated SFGroup sf_groups = 2;
|
2020-08-05 21:52:40 +00:00
|
|
|
}
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Groups the information about the NeoFS node.
|
|
|
|
message NodeInfo {
|
|
|
|
// Carries network address of the NeoFS node.
|
2020-08-06 21:59:50 +00:00
|
|
|
string address = 1;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Carries public key of the NeoFS node in a binary format.
|
2020-08-06 21:59:50 +00:00
|
|
|
bytes public_key = 2;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Groups attributes of the NeoFS node.
|
|
|
|
message Attribute {
|
|
|
|
// Carries string key to the node attribute.
|
2020-08-06 21:59:50 +00:00
|
|
|
string key = 1;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Carries string value of the node attribute.
|
2020-08-06 21:59:50 +00:00
|
|
|
string value = 2;
|
2020-08-05 21:58:09 +00:00
|
|
|
}
|
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// Carries list of the NeoFS node attributes in a string key-value format.
|
|
|
|
repeated Attribute attributes = 3;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Represents the enumeration of various states of the NeoFS node.
|
|
|
|
enum State {
|
|
|
|
// Undefined state.
|
2020-08-06 21:59:50 +00:00
|
|
|
UNKNOWN = 0;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
2020-08-06 21:59:50 +00:00
|
|
|
// Active state in the network.
|
|
|
|
ONLINE = 1;
|
2020-08-05 21:58:09 +00:00
|
|
|
|
|
|
|
// Network unavailable state.
|
2020-08-06 21:59:50 +00:00
|
|
|
OFFLINE = 2;
|
2020-08-05 21:58:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Carries state of the NeoFS node.
|
|
|
|
State state = 4;
|
|
|
|
}
|