Andrey Smirnov ab2917e833
feat(init): implement init gRPC API, forward reboot to init (#579)
This implements insecure over-file-socket gRPC API for init with two
first simplest APIs: reboot and shutdown (poweroff).

File socket is mounted only to `osd` service, so it is the only service
which can access init API. Osd forwards reboot/shutdown already
implemented APIs to init which actually executes these.

This enables graceful shutdown/reboot with service shutdown, sync, etc.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-04-26 23:04:24 +03:00

21 lines
413 B
Protocol Buffer

syntax = "proto3";
package proto;
import "google/protobuf/empty.proto";
// The Init service definition.
service Init {
rpc Reboot(google.protobuf.Empty) returns (RebootReply) {}
rpc Shutdown(google.protobuf.Empty) returns (ShutdownReply) {}
}
// The response message containing the reboot status.
message RebootReply {}
// The response message containing the shutdown status.
message ShutdownReply {}