Add depot, attendant, jetfire, optimus, ota services with kustomize overlays

This commit is contained in:
Chris Rai
2026-01-31 15:35:07 -05:00
parent a0ec642ca1
commit 9a5cb2f547
404 changed files with 38817 additions and 16 deletions

View File

@@ -0,0 +1,32 @@
package services
import (
"sync"
"github.com/fiskerinc/cloud-services/pkg/mongo"
)
var (
clientOnce sync.Once
client mongo.Client
)
// GetMongoClient returns singleton instance of mongo client
func GetMongoClient() (mongo.Client, error) {
var err error
clientOnce.Do(func() {
client, err = initMongoClient()
})
return client, err
}
func initMongoClient() (mongo.Client, error) {
var err error
if client == nil {
client, err = mongo.NewClient(mongo.StandardDB)
}
return client, err
}