feat: initialize

This commit is contained in:
2024-11-30 01:22:51 +03:30
commit 3b0aff5688
16 changed files with 761 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package managed_job
import (
"flink-kube-operator/internal/config"
"github.com/dgraph-io/badger/v4"
api "github.com/logi-camp/go-flink-client"
)
type ManagedJob struct {
def config.JobDef
client *api.Client
jarId string
db *badger.DB
state *jobState
}
func NewManagedJob(client *api.Client, db *badger.DB, def config.JobDef) *ManagedJob {
job := &ManagedJob{
def: def,
client: client,
db: db,
}
job.startCycle()
return job
}