docs: document PostgreSQL-backed config/token store

This commit is contained in:
hkfires
2025-10-13 22:31:01 +08:00
parent 5123cfd47e
commit 50c1c50dbd
4 changed files with 47 additions and 18 deletions

View File

@@ -105,7 +105,6 @@ func main() {
usePostgresStore bool
pgStoreDSN string
pgStoreSchema string
pgStoreConfigKey string
pgStoreCacheDir string
pgStoreInst *store.PostgresStore
gitStoreLocalPath string
@@ -140,9 +139,6 @@ func main() {
if value, ok := lookupEnv("PGSTORE_SCHEMA", "pgstore_schema"); ok {
pgStoreSchema = value
}
if value, ok := lookupEnv("PGSTORE_CONFIG_KEY", "pgstore_config_key"); ok {
pgStoreConfigKey = value
}
if value, ok := lookupEnv("PGSTORE_CACHE_DIR", "pgstore_cache_dir"); ok {
pgStoreCacheDir = value
}
@@ -179,10 +175,9 @@ func main() {
pgStoreCacheDir = filepath.Join(pgStoreCacheDir, "pgstore")
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
pgStoreInst, err = store.NewPostgresStore(ctx, store.PostgresStoreConfig{
DSN: pgStoreDSN,
Schema: pgStoreSchema,
ConfigKey: pgStoreConfigKey,
SpoolDir: pgStoreCacheDir,
DSN: pgStoreDSN,
Schema: pgStoreSchema,
SpoolDir: pgStoreCacheDir,
})
cancel()
if err != nil {