syntax = "proto3";
option go_package = "./pb";

package pb;

import "models/rpc_messages.proto";
import "models/model_node_value.proto";

// 节点指标数据服务
service NodeValueService {
	// 记录数据
	rpc createNodeValue (CreateNodeValueRequest) returns (RPCSuccess);

	// 读取数据
	rpc listNodeValues (ListNodeValuesRequest) returns (ListNodeValuesResponse);
}

// 记录数据
message CreateNodeValueRequest {
	string item = 1;
	bytes valueJSON = 2;
	int64 createdAt = 3;
}

// 读取数据
message ListNodeValuesRequest {
	string role = 1;
	int64 nodeId = 2;
	string item = 3;

	string range = 10;
}

message ListNodeValuesResponse {
	repeated NodeValue nodeValues = 1;
}