config.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package app
  2. type Config struct {
  3. SERVER_PORT int16 `envconfig:"SERVER_PORT"`
  4. PluginInnerApiKey string `envconfig:"PLUGIN_INNER_API_KEY"`
  5. PluginInnerApiURL string `envconfig:"PLUGIN_INNER_API_URL"`
  6. PluginRemoteInstallingHost string `envconfig:"PLUGIN_REMOTE_INSTALLING_HOST"`
  7. PluginRemoteInstallingPort int16 `envconfig:"PLUGIN_REMOTE_INSTALLING_PORT"`
  8. StoragePath string `envconfig:"STORAGE_PATH"`
  9. Platform PlatformType `envconfig:"PLATFORM"`
  10. RoutinePoolSize int `envconfig:"ROUTINE_POOL_SIZE"`
  11. RedisHost string `envconfig:"REDIS_HOST"`
  12. RedisPort int16 `envconfig:"REDIS_PORT"`
  13. RedisPass string `envconfig:"REDIS_PASS"`
  14. LifetimeCollectionHeartbeatInterval int `envconfig:"LIFETIME_COLLECTION_HEARTBEAT_INTERVAL"`
  15. LifetimeCollectionGCInterval int `envconfig:"LIFETIME_COLLECTION_GC_INTERVAL"`
  16. LifetimeStateGCInterval int `envconfig:"LIFETIME_STATE_GC_INTERVAL"`
  17. DifyInvocationConnectionIdleTimeout int `envconfig:"DIFY_INVOCATION_CONNECTION_IDLE_TIMEOUT"`
  18. }
  19. type PlatformType string
  20. const (
  21. PLATFORM_LOCAL PlatformType = "local"
  22. PLATFORM_AWS_LAMBDA PlatformType = "aws_lambda"
  23. )