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