init.go 327 B

1234567891011121314151617181920
  1. package plugin_manager
  2. import (
  3. "sync"
  4. "github.com/langgenius/dify-plugin-daemon/internal/types/entities"
  5. )
  6. var (
  7. m sync.Map
  8. )
  9. func checkPluginExist(identity string) (entities.PluginRuntimeInterface, bool) {
  10. if v, ok := m.Load(identity); ok {
  11. return v.(entities.PluginRuntimeInterface), true
  12. }
  13. return nil, false
  14. }