feat: add manager

This commit is contained in:
2024-11-30 23:36:44 +03:30
parent d8b87ac6ee
commit 6bd197b812
14 changed files with 109 additions and 67 deletions

View File

@@ -1,21 +1,21 @@
package managed_job
import (
"flink-kube-operator/internal/config"
"flink-kube-operator/internal/crd/v1alpha1"
api "github.com/logi-camp/go-flink-client"
"github.com/tidwall/buntdb"
)
type ManagedJob struct {
def config.JobDef
def v1alpha1.FlinkJob
client *api.Client
jarId string
db *buntdb.DB
state *jobState
}
func NewManagedJob(client *api.Client, db *buntdb.DB, def config.JobDef) *ManagedJob {
func NewManagedJob(client *api.Client, db *buntdb.DB, def v1alpha1.FlinkJob) *ManagedJob {
job := &ManagedJob{
def: def,
client: client,