[#1250] *: Reformat proto filets with clang-format
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
286df198c9
commit
e5767c9002
4 changed files with 99 additions and 109 deletions
|
@ -6,106 +6,108 @@ import "pkg/services/control/ir/types.proto";
|
||||||
|
|
||||||
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/ir/control";
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/ir/control";
|
||||||
|
|
||||||
// `ControlService` provides an interface for internal work with the Inner Ring node.
|
// `ControlService` provides an interface for internal work with the Inner Ring
|
||||||
|
// node.
|
||||||
service ControlService {
|
service ControlService {
|
||||||
// Performs health check of the IR node.
|
// Performs health check of the IR node.
|
||||||
rpc HealthCheck (HealthCheckRequest) returns (HealthCheckResponse);
|
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
|
||||||
// Forces a new epoch to be signaled by the IR node with high probability.
|
// Forces a new epoch to be signaled by the IR node with high probability.
|
||||||
rpc TickEpoch (TickEpochRequest) returns (TickEpochResponse);
|
rpc TickEpoch(TickEpochRequest) returns (TickEpochResponse);
|
||||||
// Forces a node removal to be signaled by the IR node with high probability.
|
// Forces a node removal to be signaled by the IR node with high probability.
|
||||||
rpc RemoveNode (RemoveNodeRequest) returns (RemoveNodeResponse);
|
rpc RemoveNode(RemoveNodeRequest) returns (RemoveNodeResponse);
|
||||||
// Forces a container removal to be signaled by the IR node with high probability.
|
// Forces a container removal to be signaled by the IR node with high
|
||||||
rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse);
|
// probability.
|
||||||
|
rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Health check request.
|
// Health check request.
|
||||||
message HealthCheckRequest {
|
message HealthCheckRequest {
|
||||||
// Health check request body.
|
// Health check request body.
|
||||||
message Body {}
|
message Body {}
|
||||||
|
|
||||||
// Body of health check request message.
|
// Body of health check request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Body signature.
|
// Body signature.
|
||||||
// Should be signed by node key or one of
|
// Should be signed by node key or one of
|
||||||
// the keys configured by the node.
|
// the keys configured by the node.
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Health check response.
|
// Health check response.
|
||||||
message HealthCheckResponse {
|
message HealthCheckResponse {
|
||||||
// Health check response body
|
// Health check response body
|
||||||
message Body {
|
message Body {
|
||||||
// Health status of IR node application.
|
// Health status of IR node application.
|
||||||
HealthStatus health_status = 1;
|
HealthStatus health_status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of health check response message.
|
// Body of health check response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Body signature.
|
// Body signature.
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TickEpochRequest {
|
message TickEpochRequest {
|
||||||
message Body{
|
message Body {
|
||||||
// Valid until block value override.
|
// Valid until block value override.
|
||||||
uint32 vub = 1;
|
uint32 vub = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TickEpochResponse {
|
message TickEpochResponse {
|
||||||
message Body{
|
message Body {
|
||||||
// Valid until block value for transaction.
|
// Valid until block value for transaction.
|
||||||
uint32 vub = 1;
|
uint32 vub = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveNodeRequest {
|
message RemoveNodeRequest {
|
||||||
message Body{
|
message Body {
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
// Valid until block value override.
|
// Valid until block value override.
|
||||||
uint32 vub = 2;
|
uint32 vub = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveNodeResponse {
|
message RemoveNodeResponse {
|
||||||
message Body{
|
message Body {
|
||||||
// Valid until block value for transaction.
|
// Valid until block value for transaction.
|
||||||
uint32 vub = 1;
|
uint32 vub = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveContainerRequest {
|
message RemoveContainerRequest {
|
||||||
message Body{
|
message Body {
|
||||||
bytes container_id = 1;
|
bytes container_id = 1;
|
||||||
bytes owner = 2;
|
bytes owner = 2;
|
||||||
// Valid until block value override.
|
// Valid until block value override.
|
||||||
uint32 vub = 3;
|
uint32 vub = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveContainerResponse {
|
message RemoveContainerResponse {
|
||||||
message Body{
|
message Body {
|
||||||
// Valid until block value for transaction.
|
// Valid until block value for transaction.
|
||||||
uint32 vub = 1;
|
uint32 vub = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,24 +6,24 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/ir/
|
||||||
|
|
||||||
// Signature of some message.
|
// Signature of some message.
|
||||||
message Signature {
|
message Signature {
|
||||||
// Public key used for signing.
|
// Public key used for signing.
|
||||||
bytes key = 1 [json_name = "key"];
|
bytes key = 1 [ json_name = "key" ];
|
||||||
|
|
||||||
// Binary signature.
|
// Binary signature.
|
||||||
bytes sign = 2 [json_name = "signature"];
|
bytes sign = 2 [ json_name = "signature" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Health status of the IR application.
|
// Health status of the IR application.
|
||||||
enum HealthStatus {
|
enum HealthStatus {
|
||||||
// Undefined status, default value.
|
// Undefined status, default value.
|
||||||
HEALTH_STATUS_UNDEFINED = 0;
|
HEALTH_STATUS_UNDEFINED = 0;
|
||||||
|
|
||||||
// IR application is starting.
|
// IR application is starting.
|
||||||
STARTING = 1;
|
STARTING = 1;
|
||||||
|
|
||||||
// IR application is started and serves all services.
|
// IR application is started and serves all services.
|
||||||
READY = 2;
|
READY = 2;
|
||||||
|
|
||||||
// IR application is shutting down.
|
// IR application is shutting down.
|
||||||
SHUTTING_DOWN = 3;
|
SHUTTING_DOWN = 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,25 +28,25 @@ service TreeService {
|
||||||
// Otherwise, a request is denied.
|
// Otherwise, a request is denied.
|
||||||
|
|
||||||
// Add adds new node to the tree. Invoked by a client.
|
// Add adds new node to the tree. Invoked by a client.
|
||||||
rpc Add (AddRequest) returns (AddResponse);
|
rpc Add(AddRequest) returns (AddResponse);
|
||||||
// AddByPath adds new node to the tree by path. Invoked by a client.
|
// AddByPath adds new node to the tree by path. Invoked by a client.
|
||||||
rpc AddByPath (AddByPathRequest) returns (AddByPathResponse);
|
rpc AddByPath(AddByPathRequest) returns (AddByPathResponse);
|
||||||
// Remove removes node from the tree. Invoked by a client.
|
// Remove removes node from the tree. Invoked by a client.
|
||||||
rpc Remove (RemoveRequest) returns (RemoveResponse);
|
rpc Remove(RemoveRequest) returns (RemoveResponse);
|
||||||
// Move moves node from one parent to another. Invoked by a client.
|
// Move moves node from one parent to another. Invoked by a client.
|
||||||
rpc Move (MoveRequest) returns (MoveResponse);
|
rpc Move(MoveRequest) returns (MoveResponse);
|
||||||
// GetNodeByPath returns list of IDs corresponding to a specific filepath.
|
// GetNodeByPath returns list of IDs corresponding to a specific filepath.
|
||||||
rpc GetNodeByPath (GetNodeByPathRequest) returns (GetNodeByPathResponse);
|
rpc GetNodeByPath(GetNodeByPathRequest) returns (GetNodeByPathResponse);
|
||||||
// GetSubTree returns tree corresponding to a specific node.
|
// GetSubTree returns tree corresponding to a specific node.
|
||||||
rpc GetSubTree (GetSubTreeRequest) returns (stream GetSubTreeResponse);
|
rpc GetSubTree(GetSubTreeRequest) returns (stream GetSubTreeResponse);
|
||||||
// TreeList return list of the existing trees in the container.
|
// TreeList return list of the existing trees in the container.
|
||||||
rpc TreeList (TreeListRequest) returns (TreeListResponse);
|
rpc TreeList(TreeListRequest) returns (TreeListResponse);
|
||||||
|
|
||||||
/* Synchronization API */
|
/* Synchronization API */
|
||||||
|
|
||||||
// Apply pushes log operation from another node to the current.
|
// Apply pushes log operation from another node to the current.
|
||||||
// The request must be signed by a container node.
|
// The request must be signed by a container node.
|
||||||
rpc Apply (ApplyRequest) returns (ApplyResponse);
|
rpc Apply(ApplyRequest) returns (ApplyResponse);
|
||||||
// GetOpLog returns a stream of logged operations starting from some height.
|
// GetOpLog returns a stream of logged operations starting from some height.
|
||||||
rpc GetOpLog(GetOpLogRequest) returns (stream GetOpLogResponse);
|
rpc GetOpLog(GetOpLogRequest) returns (stream GetOpLogResponse);
|
||||||
// Healthcheck is a dummy rpc to check service availability
|
// Healthcheck is a dummy rpc to check service availability
|
||||||
|
@ -85,7 +85,6 @@ message AddResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message AddByPathRequest {
|
message AddByPathRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// Container ID in V2 format.
|
// Container ID in V2 format.
|
||||||
|
@ -122,7 +121,6 @@ message AddByPathResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message RemoveRequest {
|
message RemoveRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// Container ID in V2 format.
|
// Container ID in V2 format.
|
||||||
|
@ -142,8 +140,7 @@ message RemoveRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message RemoveResponse {
|
message RemoveResponse {
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Response body.
|
// Response body.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -151,7 +148,6 @@ message RemoveResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message MoveRequest {
|
message MoveRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// TODO import neo.fs.v2.refs.ContainerID directly.
|
// TODO import neo.fs.v2.refs.ContainerID directly.
|
||||||
|
@ -176,8 +172,7 @@ message MoveRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message MoveResponse {
|
message MoveResponse {
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Response body.
|
// Response body.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -185,7 +180,6 @@ message MoveResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message GetNodeByPathRequest {
|
message GetNodeByPathRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// Container ID in V2 format.
|
// Container ID in V2 format.
|
||||||
|
@ -235,7 +229,6 @@ message GetNodeByPathResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message GetSubTreeRequest {
|
message GetSubTreeRequest {
|
||||||
message Body {
|
message Body {
|
||||||
message Order {
|
message Order {
|
||||||
|
@ -307,7 +300,6 @@ message TreeListResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message ApplyRequest {
|
message ApplyRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// Container ID in V2 format.
|
// Container ID in V2 format.
|
||||||
|
@ -325,8 +317,7 @@ message ApplyRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message ApplyResponse {
|
message ApplyResponse {
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Response body.
|
// Response body.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -334,7 +325,6 @@ message ApplyResponse {
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
message GetOpLogRequest {
|
message GetOpLogRequest {
|
||||||
message Body {
|
message Body {
|
||||||
// Container ID in V2 format.
|
// Container ID in V2 format.
|
||||||
|
@ -366,8 +356,7 @@ message GetOpLogResponse {
|
||||||
};
|
};
|
||||||
|
|
||||||
message HealthcheckResponse {
|
message HealthcheckResponse {
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Response body.
|
// Response body.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
@ -376,8 +365,7 @@ message HealthcheckResponse {
|
||||||
};
|
};
|
||||||
|
|
||||||
message HealthcheckRequest {
|
message HealthcheckRequest {
|
||||||
message Body {
|
message Body {}
|
||||||
}
|
|
||||||
|
|
||||||
// Request body.
|
// Request body.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
|
@ -10,25 +10,25 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/tre
|
||||||
// KeyValue represents key-value pair attached to an object.
|
// KeyValue represents key-value pair attached to an object.
|
||||||
message KeyValue {
|
message KeyValue {
|
||||||
// Attribute name.
|
// Attribute name.
|
||||||
string key = 1 [json_name = "key"];
|
string key = 1 [ json_name = "key" ];
|
||||||
// Attribute value.
|
// Attribute value.
|
||||||
bytes value = 2 [json_name = "value"];
|
bytes value = 2 [ json_name = "value" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogMove represents log-entry for a single move operation.
|
// LogMove represents log-entry for a single move operation.
|
||||||
message LogMove {
|
message LogMove {
|
||||||
// ID of the parent node.
|
// ID of the parent node.
|
||||||
uint64 parent_id = 1 [json_name = "parentID"];
|
uint64 parent_id = 1 [ json_name = "parentID" ];
|
||||||
// Node meta information, including operation timestamp.
|
// Node meta information, including operation timestamp.
|
||||||
bytes meta = 2 [json_name = "meta"];
|
bytes meta = 2 [ json_name = "meta" ];
|
||||||
// ID of the node to move.
|
// ID of the node to move.
|
||||||
uint64 child_id = 3 [json_name = "childID"];
|
uint64 child_id = 3 [ json_name = "childID" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signature of a message.
|
// Signature of a message.
|
||||||
message Signature {
|
message Signature {
|
||||||
// Serialized public key as defined in FrostFS API.
|
// Serialized public key as defined in FrostFS API.
|
||||||
bytes key = 1 [json_name = "key"];
|
bytes key = 1 [ json_name = "key" ];
|
||||||
// Signature of a message body.
|
// Signature of a message body.
|
||||||
bytes sign = 2 [json_name = "signature"];
|
bytes sign = 2 [ json_name = "signature" ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue