frostfs-api/netmap/types.proto
Leonard Lyubich 031579a68d [] bootstrap: Move NodeInfo to netmap
Move NodeInfo message definition to netmap package. Package bootstrap is
completely removed from the repository.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:33:24 +03:00

92 lines
No EOL
2.1 KiB
Protocol Buffer

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;
}
// Groups the information about the NeoFS node.
message NodeInfo {
// Carries network address of the NeoFS node.
string Address = 1;
// Carries public key of the NeoFS node in a binary format.
bytes PublicKey = 2;
// Groups attributes of the NeoFS node.
message Attribute {
// Carries string key to the node attribute.
string Key = 1;
// Carries string value of the node attribute.
string Value = 2;
}
// // Carries list of the NeoFS node attributes in a string key-value format.
repeated Attribute Attributes = 3;
// Represents the enumeration of various states of the NeoFS node.
enum State {
// Undefined state.
Unknown = 0;
// Active state on the network.
Online = 1;
// Network unavailable state.
Offline = 2;
}
// Carries state of the NeoFS node.
State state = 4;
}