syntax = "proto3";
package akash.inventory.v1;

import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "akash/inventory/v1/node.proto";
import "akash/inventory/v1/cluster.proto";

option go_package = "github.com/akash-network/akash-api/go/inventory/v1";


// NodeRPC defines the RPC server of node
service NodeRPC {
  // QueryNode defines a method to query hardware state of the node
  // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
  // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
  rpc QueryNode(google.protobuf.Empty) returns (Node) {
    option (google.api.http) = {
      get: "/v1/node",
      response_body: "*"
    };
  }

  // StreamNode defines a method to stream hardware state of the node
  // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
  // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
  rpc StreamNode(google.protobuf.Empty) returns (stream Node);
}

// ClusterRPC defines the RPC server of cluster
service ClusterRPC {
  // QueryCluster defines a method to query hardware state of the cluster
  // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
  // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
  rpc QueryCluster(google.protobuf.Empty) returns (Cluster) {
    option (google.api.http) = {
      get: "/v1/inventory",
      response_body: "*"
    };
  }
  // StreamCluster defines a method to stream hardware state of the cluster
  // buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
  // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
  rpc StreamCluster(google.protobuf.Empty) returns (stream Cluster);
}
