Files
Byron.wang 1c9e28bc75 Feat: Replace the internal/oss module with dify-cloud-kit (#317)
* replace internal oss with dify-cloud-kit

* remove validate

* fix tests

* fix tests
2025-05-30 16:44:59 +08:00

26 lines
545 B
Go

package persistence
import (
"github.com/langgenius/dify-cloud-kit/oss"
"github.com/langgenius/dify-plugin-daemon/internal/types/app"
"github.com/langgenius/dify-plugin-daemon/internal/utils/log"
)
var (
persistence *Persistence
)
func InitPersistence(oss oss.OSS, config *app.Config) {
persistence = &Persistence{
storage: NewWrapper(oss, config.PersistenceStoragePath),
maxStorageSize: config.PersistenceStorageMaxSize,
}
log.Info("Persistence initialized")
}
func GetPersistence() *Persistence {
return persistence
}