ORE Studio 0.0.4
Loading...
Searching...
No Matches
host.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2026 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_COMPUTE_DOMAIN_HOST_HPP
21#define ORES_COMPUTE_DOMAIN_HOST_HPP
22
23#include <string>
24#include <cstdint>
25#include <chrono>
26#include "ores.utility/uuid/tenant_id.hpp"
27
28namespace ores::compute::domain {
29
36struct host final {
40 int version = 0;
41
46
50 boost::uuids::uuid id;
51
55 std::string external_id;
56
61 std::string display_name;
62
66 std::string location;
67
72
76 std::int64_t ram_mb;
77
81 std::string gpu_type;
82
86 std::chrono::system_clock::time_point last_rpc_time;
87
92
96 std::string modified_by;
97
101 std::string performed_by;
102
109
113 std::string change_commentary;
114
118 std::chrono::system_clock::time_point recorded_at;
119};
120
121}
122
123#endif
A registered compute node in the distributed grid.
Definition host.hpp:36
std::string modified_by
Username of the person who last modified this compute host.
Definition host.hpp:96
std::string change_commentary
Free-text commentary explaining the change.
Definition host.hpp:113
int cpu_count
Total logical CPU cores available.
Definition host.hpp:71
double credit_total
Accumulated work units successfully processed by this host.
Definition host.hpp:91
std::int64_t ram_mb
Total system memory in megabytes.
Definition host.hpp:76
std::string external_id
User-defined name or hostname for the node.
Definition host.hpp:55
std::string display_name
Whimsical adjective+animal display name assigned on first registration. Display-only; never used as a...
Definition host.hpp:61
std::chrono::system_clock::time_point recorded_at
Timestamp when this version of the record was recorded.
Definition host.hpp:118
boost::uuids::uuid id
UUID primary key for the host.
Definition host.hpp:50
int version
Version number for optimistic locking and change tracking.
Definition host.hpp:40
std::chrono::system_clock::time_point last_rpc_time
Timestamp of the last heartbeat received from this node.
Definition host.hpp:86
std::string location
Physical site or region identifier.
Definition host.hpp:66
std::string performed_by
Username of the account that performed this action.
Definition host.hpp:101
std::string gpu_type
GPU model identifier, e.g. 'A100' or NULL if no GPU.
Definition host.hpp:81
utility::uuid::tenant_id tenant_id
Tenant identifier for multi-tenancy isolation.
Definition host.hpp:45
std::string change_reason_code
Code identifying the reason for the change.
Definition host.hpp:108
A strongly-typed wrapper around a UUID representing a tenant identifier.
Definition tenant_id.hpp:66
static tenant_id system()
Creates a tenant_id representing the system tenant.
Definition tenant_id.cpp:41