feat: change db to buntdb

This commit is contained in:
2024-11-30 21:08:06 +03:30
parent 412a5292cb
commit d8b87ac6ee
6 changed files with 345 additions and 93 deletions

View File

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