From 42d2286739d84900d80eae861d66e06b8d290758 Mon Sep 17 00:00:00 2001 From: Craig Condit Date: Wed, 30 Nov 2022 11:08:04 -0600 Subject: [PATCH] [YUNIKORN-1435] Add plugin interface to allow RM state dump (#79) Closes: #79 --- lib/go/api/interface.go | 7 +++++++ scheduler-interface-spec.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/go/api/interface.go b/lib/go/api/interface.go index 53cbf76..3d19020 100644 --- a/lib/go/api/interface.go +++ b/lib/go/api/interface.go @@ -65,3 +65,10 @@ type ResourceManagerCallback interface { // the shim side implementation must be thread safe UpdateContainerSchedulingState(request *si.UpdateContainerSchedulingStateRequest) } + +// RM can additionally implement this API to provide information during state dumps +type StateDumpPlugin interface { + + // This plugin is responsible for returning a JSON representation of the state of the shim + GetStateDump() (string, error) +} diff --git a/scheduler-interface-spec.md b/scheduler-interface-spec.md index f5265fb..23732e3 100644 --- a/scheduler-interface-spec.md +++ b/scheduler-interface-spec.md @@ -190,6 +190,13 @@ type ResourceManagerCallback interface { // the shim side implementation must be thread safe UpdateContainerSchedulingState(request *si.UpdateContainerSchedulingStateRequest) } + +// RM can additionally implement this API to provide information during state dumps +type StateDumpPlugin interface { + + // This plugin is responsible for returning a JSON representation of the state of the shim + GetStateDump() (string, error) +} ``` ### Communications between RM and Scheduler