summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-api/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-04 14:43:17 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-05-04 14:43:17 +0200
commit564911a2458b3c54834d5cbfed91f502e9856566 (patch)
treecca136c69c5aef87071b5781da0f9a260683186b /opendc-compute/opendc-compute-api/src/main
parent4883d8eb0c6cae82153aaf5f12561014d08cdc41 (diff)
refactor(compute): Directly expose scheduler stats to user
This change updates the `ComputeService` interface to directly expose statistics about the scheduler to the user, such that they do not necessarily have to interact with OpenTelemetry to obtain these values.
Diffstat (limited to 'opendc-compute/opendc-compute-api/src/main')
-rw-r--r--opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Server.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Server.kt b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Server.kt
index b508a9f8..64b73d0b 100644
--- a/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Server.kt
+++ b/opendc-compute/opendc-compute-api/src/main/kotlin/org/opendc/compute/api/Server.kt
@@ -22,6 +22,8 @@
package org.opendc.compute.api
+import java.time.Instant
+
/**
* A stateful object representing a server instance that is running on some physical or virtual machine.
*/
@@ -42,6 +44,11 @@ public interface Server : Resource {
public val state: ServerState
/**
+ * The most recent moment in time when the server was launched.
+ */
+ public val launchedAt: Instant?
+
+ /**
* Request the server to be started.
*
* This method is guaranteed to return after the request was acknowledged, but might return before the server was