config.go 996 B

1234567891011121314151617181920212223242526272829303132
  1. package app
  2. type Config struct {
  3. DifyURL string `envconfig:"DIFY_URL"`
  4. DifyCallingKey string `envconfig:"DIFY_CALLING_KEY"`
  5. DifyCallingPort int16 `envconfig:"DIFY_CALLING_PORT"`
  6. PluginHost string `envconfig:"PLUGIN_HOST"`
  7. PluginPort int16 `envconfig:"PLUGIN_PORT"`
  8. StoragePath string `envconfig:"STORAGE_PATH"`
  9. Platform string `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. const (
  20. PLATFORM_LOCAL = "local"
  21. PLATFORM_AWS_LAMBDA = "aws_lambda"
  22. )