Add hepc integration
This commit is contained in:
committed by
=Michael Hohn
parent
4140eaafc4
commit
23e3ea9367
@@ -4,11 +4,12 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/hohn/mrvacommander/pkg/artifactstore"
|
||||
"github.com/hohn/mrvacommander/pkg/qldbstore"
|
||||
"github.com/hohn/mrvacommander/pkg/queue"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func validateEnvVars(requiredEnvVars []string) {
|
||||
@@ -94,3 +95,17 @@ func InitMinIOCodeQLDatabaseStore() (qldbstore.Store, error) {
|
||||
|
||||
return store, nil
|
||||
}
|
||||
|
||||
func InitHEPCDatabaseStore() (qldbstore.Store, error) {
|
||||
requiredEnvVars := []string{
|
||||
"MRVA_HEPC_ENDPOINT",
|
||||
"MRVA_HEPC_CACHE_DURATION",
|
||||
}
|
||||
validateEnvVars(requiredEnvVars)
|
||||
|
||||
endpoint := os.Getenv("MRVA_HEPC_ENDPOINT")
|
||||
|
||||
store := qldbstore.NewHepcStore(endpoint)
|
||||
|
||||
return store, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user