diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go new file mode 100644 index 0000000..49ff3de --- /dev/null +++ b/internal/scheduler/scheduler.go @@ -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 +} diff --git a/internal/scheduler/slurmNats.go b/internal/scheduler/slurmNats.go new file mode 100644 index 0000000..1fabab2 --- /dev/null +++ b/internal/scheduler/slurmNats.go @@ -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() { + +} diff --git a/internal/scheduler/slurmRest.go b/internal/scheduler/slurmRest.go new file mode 100644 index 0000000..144d1c3 --- /dev/null +++ b/internal/scheduler/slurmRest.go @@ -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() { + +}