2020-08-05 21:52:40 +00:00
# Protocol Documentation
< a name = "top" > < / a >
## Table of Contents
- [netmap/types.proto ](#netmap/types.proto )
- Messages
2020-08-13 16:18:53 +00:00
- [NodeInfo ](#neo.fs.v2.netmap.NodeInfo )
- [NodeInfo.Attribute ](#neo.fs.v2.netmap.NodeInfo.Attribute )
- [PlacementPolicy ](#neo.fs.v2.netmap.PlacementPolicy )
- [PlacementPolicy.FilterGroup ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup )
- [PlacementPolicy.FilterGroup.Filter ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter )
- [PlacementPolicy.FilterGroup.Filter.SimpleFilter ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter )
- [PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters )
- [PlacementPolicy.FilterGroup.Selector ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Selector )
2020-08-05 21:52:40 +00:00
- [Scalar Value Types ](#scalar-value-types )
< a name = "netmap/types.proto" > < / a >
< p align = "right" > < a href = "#top" > Top< / a > < / p >
## netmap/types.proto
<!-- end services -->
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.NodeInfo" > < / a >
2020-08-05 21:58:09 +00:00
### Message NodeInfo
2020-08-13 16:18:53 +00:00
NeoFS node description
2020-08-05 21:58:09 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| public_key | [bytes ](#bytes ) | | Public key of the NeoFS node in a binary format. |
2020-08-31 10:56:03 +00:00
| address | [string ](#string ) | | Ways to connect to a node |
2020-08-13 16:18:53 +00:00
| attributes | [NodeInfo.Attribute ](#neo.fs.v2.netmap.NodeInfo.Attribute ) | repeated | Carries list of the NeoFS node attributes in a string key-value format. |
| state | [NodeInfo.State ](#neo.fs.v2.netmap.NodeInfo.State ) | | Carries state of the NeoFS node. |
2020-08-05 21:58:09 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.NodeInfo.Attribute" > < / a >
2020-08-05 21:58:09 +00:00
### Message NodeInfo.Attribute
2020-08-13 16:18:53 +00:00
Attributes of the NeoFS node.
2020-08-05 21:58:09 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| key | [string ](#string ) | | Key of the node attribute. |
| value | [string ](#string ) | | Value of the node attribute. |
2020-08-05 21:58:09 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy
Set of rules to select a subset of nodes able to store container's objects
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| repl_factor | [uint32 ](#uint32 ) | | Replication factor |
| filter_groups | [PlacementPolicy.FilterGroup ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup ) | repeated | List of filter groups |
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy.FilterGroup
Filters to apply to Network Map
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| filters | [PlacementPolicy.FilterGroup.Filter ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter ) | repeated | Resulting filter list |
| selectors | [PlacementPolicy.FilterGroup.Selector ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Selector ) | repeated | List of selectors |
| exclude | [uint32 ](#uint32 ) | repeated | Parts of graph to exclude. Internal use. |
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy.FilterGroup.Filter
Filter definition
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| key | [string ](#string ) | | Filter identifier |
| f | [PlacementPolicy.FilterGroup.Filter.SimpleFilter ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter ) | | The rest of filter |
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy.FilterGroup.Filter.SimpleFilter
Minimal simple filter
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| op | [PlacementPolicy.FilterGroup.Filter.SimpleFilter.Operation ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.Operation ) | | Filtering operation |
| value | [string ](#string ) | | Value |
| f_args | [PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters ) | | Result of other filter application |
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy.FilterGroup.Filter.SimpleFilter.SimpleFilters
List of filters
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| filters | [PlacementPolicy.FilterGroup.Filter.SimpleFilter ](#neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter ) | repeated | List of filters |
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Selector" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### Message PlacementPolicy.FilterGroup.Selector
Selector
2020-08-05 21:52:40 +00:00
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
2020-08-13 16:18:53 +00:00
| count | [uint32 ](#uint32 ) | | How many to select |
| key | [string ](#string ) | | Key to select |
2020-08-05 21:52:40 +00:00
<!-- end messages -->
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.NodeInfo.State" > < / a >
2020-08-05 21:58:09 +00:00
### NodeInfo.State
Represents the enumeration of various states of the NeoFS node.
| Name | Number | Description |
| ---- | ------ | ----------- |
2020-08-13 16:18:53 +00:00
| UNSPECIFIED | 0 | Unknown state. |
2020-08-07 07:53:45 +00:00
| ONLINE | 1 | Active state in the network. |
| OFFLINE | 2 | Network unavailable state. |
2020-08-05 21:58:09 +00:00
2020-08-13 16:18:53 +00:00
< a name = "neo.fs.v2.netmap.PlacementPolicy.FilterGroup.Filter.SimpleFilter.Operation" > < / a >
2020-08-05 21:52:40 +00:00
2020-08-13 16:18:53 +00:00
### PlacementPolicy.FilterGroup.Filter.SimpleFilter.Operation
Filtering operation
2020-08-05 21:52:40 +00:00
| Name | Number | Description |
| ---- | ------ | ----------- |
2020-08-13 16:18:53 +00:00
| OPERATION_UNSPECIFIED | 0 | No Operation defined |
| EQ | 1 | Equal |
| NE | 2 | Not Equal |
| GT | 3 | Greater then |
| GE | 4 | Greater or equal |
| LT | 5 | Less then |
| LE | 6 | Less or equal |
| OR | 7 | Logical OR |
| AND | 8 | Logical AND |
2020-08-05 21:52:40 +00:00
<!-- end enums -->
## Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
| < a name = "double" / > double | | double | double | float |
| < a name = "float" / > float | | float | float | float |
| < a name = "int32" / > int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| < a name = "int64" / > int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| < a name = "uint32" / > uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| < a name = "uint64" / > uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| < a name = "sint32" / > sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| < a name = "sint64" / > sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| < a name = "fixed32" / > fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| < a name = "fixed64" / > fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| < a name = "sfixed32" / > sfixed32 | Always four bytes. | int32 | int | int |
| < a name = "sfixed64" / > sfixed64 | Always eight bytes. | int64 | long | int/long |
| < a name = "bool" / > bool | | bool | boolean | boolean |
| < a name = "string" / > string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| < a name = "bytes" / > bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |