Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

opengauss_config.py 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. from pydantic import Field, PositiveInt
  2. from pydantic_settings import BaseSettings
  3. class OpenGaussConfig(BaseSettings):
  4. """
  5. Configuration settings for OpenGauss
  6. """
  7. OPENGAUSS_HOST: str | None = Field(
  8. description="Hostname or IP address of the OpenGauss server(e.g., 'localhost')",
  9. default=None,
  10. )
  11. OPENGAUSS_PORT: PositiveInt = Field(
  12. description="Port number on which the OpenGauss server is listening (default is 6600)",
  13. default=6600,
  14. )
  15. OPENGAUSS_USER: str | None = Field(
  16. description="Username for authenticating with the OpenGauss database",
  17. default=None,
  18. )
  19. OPENGAUSS_PASSWORD: str | None = Field(
  20. description="Password for authenticating with the OpenGauss database",
  21. default=None,
  22. )
  23. OPENGAUSS_DATABASE: str | None = Field(
  24. description="Name of the OpenGauss database to connect to",
  25. default=None,
  26. )
  27. OPENGAUSS_MIN_CONNECTION: PositiveInt = Field(
  28. description="Min connection of the OpenGauss database",
  29. default=1,
  30. )
  31. OPENGAUSS_MAX_CONNECTION: PositiveInt = Field(
  32. description="Max connection of the OpenGauss database",
  33. default=5,
  34. )
  35. OPENGAUSS_ENABLE_PQ: bool = Field(
  36. description="Enable openGauss PQ acceleration feature",
  37. default=False,
  38. )