mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-14 10:47:26 +01:00
28 lines
496 B
Go
28 lines
496 B
Go
|
// 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
|
||
|
}
|