From 999345b4bf7ee87306eb5a7ca3b5cdf3dfd856ba Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Wed, 26 Oct 2022 17:00:30 +0100 Subject: [PATCH 1/2] feat: add container metrics --- src/rest/types/channels.ts | 7 +++++++ src/rest/types/ignite.ts | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/rest/types/channels.ts b/src/rest/types/channels.ts index eb106ffd..270330b2 100644 --- a/src/rest/types/channels.ts +++ b/src/rest/types/channels.ts @@ -8,8 +8,15 @@ export enum ChannelType { UNPROTECTED = 'unprotected', } +/** + * Generic state type of a channel + * @public + */ export type State = Record; +/** + * @public + */ export interface Channel { /** * The ID of the channel diff --git a/src/rest/types/ignite.ts b/src/rest/types/ignite.ts index f7aeab4c..f19fff9c 100644 --- a/src/rest/types/ignite.ts +++ b/src/rest/types/ignite.ts @@ -140,6 +140,14 @@ export interface Container { last_start: Timestamp; }; + /** + * Metrics for this container + */ + metrics: { + cpu_usage_percent: number; + memory_usage_percent: number; + } | null; + /** * Information about the container */ From 7882842ad439aaf8a7ce75bc8bf2c689c535b8ab Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Wed, 26 Oct 2022 17:00:44 +0100 Subject: [PATCH 2/2] docs(changeset): added container metrics --- .changeset/chilled-comics-marry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/chilled-comics-marry.md diff --git a/.changeset/chilled-comics-marry.md b/.changeset/chilled-comics-marry.md new file mode 100644 index 00000000..553de319 --- /dev/null +++ b/.changeset/chilled-comics-marry.md @@ -0,0 +1,5 @@ +--- +'@onehop/js': patch +--- + +added container metrics