Introduce batch scheduler plugins

This commit is contained in:
Jan Eitzinger 2023-06-22 08:25:32 +02:00
parent d0516f12b0
commit e5f7ad8ac0
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,27 @@
// Copyright (C) 2023 NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package scheduler
import "encoding/json"
type BatchScheduler interface {
Init(rawConfig json.RawMessage) error
Sync()
}
var sd BatchScheduler
func Init(rawConfig json.RawMessage) error {
sd = &SlurmNatsScheduler{}
sd.Init(rawConfig)
return nil
}
func GetHandle() BatchScheduler {
return sd
}

View File

@ -0,0 +1,24 @@
// Copyright (C) 2023 NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package scheduler
import "encoding/json"
type SlurmNatsConfig struct {
URL string `json:"url"`
}
type SlurmNatsScheduler struct {
url string
}
func (sd *SlurmNatsScheduler) Init(rawConfig json.RawMessage) error {
return nil
}
func (sd *SlurmNatsScheduler) Sync() {
}

View File

@ -0,0 +1,24 @@
// Copyright (C) 2023 NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package scheduler
import "encoding/json"
type SlurmRestSchedulerConfig struct {
URL string `json:"url"`
}
type SlurmRestScheduler struct {
url string
}
func (sd *SlurmRestScheduler) Init(rawConfig json.RawMessage) error {
return nil
}
func (sd *SlurmRestScheduler) Sync() {
}