[#414] ir/control: Implement service server

Implement `ControlServiceServer` on `Server` type. The `Server` requires all
requests to be signed with keys from the so-called whitelist. To obtain
health status, it uses the abstraction in the form of `HealthChecker`
interface.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-09 18:40:02 +03:00 committed by Alex Vanin
parent 93803b1a90
commit dcfe9a6504
6 changed files with 200 additions and 0 deletions

View file

@ -0,0 +1,13 @@
package control
import control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
// HealthChecker is component interface for calculating
// the current health status of a node.
type HealthChecker interface {
// Must calculate and return current health status of the IR application.
//
// If status can not be calculated for any reason,
// control.HealthStatus_HEALTH_STATUS_UNDEFINED should be returned.
HealthStatus() control.HealthStatus
}