syntax = "proto2";

option java_multiple_files = true;
option java_package = "alluxio.hub.proto";
option java_outer_classname = "HubManagerProto";

package alluxio.hub.proto;

import "grpc/rest.proto";

service ManagerAgentService {
  /**
    * A running agent will send a heartbeat message to the manager on an interval timer
    */
  rpc AgentHeartbeat(AgentHeartbeatRequest) returns (AgentHeartbeatResponse);
  /**
   * A running agent will attempt to register with the manager on startup
   */
  rpc RegisterAgent(RegisterAgentRequest) returns (RegisterAgentResponse);
}

message RegisterAgentRequest {
  optional HubNodeAddress node = 1;
}

message RegisterAgentResponse {
  optional bool ok = 1;
}

message AgentHeartbeatRequest {
  optional HubNodeAddress hub_node = 1;
  optional AlluxioNodeStatus alluxio_status = 2;
}

message AgentHeartbeatResponse {
  optional bool ok = 1;
}
