[#1768] Add healthcheck method to the Tree service

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2022-10-10 14:33:17 +03:00 committed by fyrchik
parent 807c0a1321
commit feaa9eace7
7 changed files with 27 additions and 0 deletions

View file

@ -17,6 +17,7 @@ Changelog for NeoFS Node
- `--timeout` flag in `neofs-cli` subcommands (#1837) - `--timeout` flag in `neofs-cli` subcommands (#1837)
- `container nodes` command to output list of nodes for container, grouped by replica (#1704) - `container nodes` command to output list of nodes for container, grouped by replica (#1704)
- Configuration flag to ignore shard in `neofs-node` (#1840) - Configuration flag to ignore shard in `neofs-node` (#1840)
- Add new RPC `TreeService.Healthcheck`
### Changed ### Changed
- Allow to evacuate shard data with `EvacuateShard` control RPC (#1800) - Allow to evacuate shard data with `EvacuateShard` control RPC (#1800)

View file

@ -558,3 +558,7 @@ func (s *Service) getContainerInfo(cid cidSDK.ID, pub []byte) ([]netmapSDK.NodeI
} }
return cntNodes, -1, len(cntNodes), nil return cntNodes, -1, len(cntNodes), nil
} }
func (s *Service) Healthcheck(context.Context, *HealthcheckRequest) (*HealthcheckResponse, error) {
return new(HealthcheckResponse), nil
}

Binary file not shown.

View file

@ -47,6 +47,8 @@ service TreeService {
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
rpc Healthcheck(HealthcheckRequest) returns (HealthcheckResponse);
} }
message AddRequest { message AddRequest {
@ -328,3 +330,23 @@ message GetOpLogResponse {
// Response signature. // Response signature.
Signature signature = 2; Signature signature = 2;
}; };
message HealthcheckResponse {
message Body {
}
// Response body.
Body body = 1;
// Response signature.
Signature signature = 2;
};
message HealthcheckRequest {
message Body {
}
// Request body.
Body body = 1;
// Request signature.
Signature signature = 2;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.