init.go 322 B

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