opensearch_configs.py 746 B

12345678910111213141516171819202122232425262728293031323334
  1. from typing import Optional
  2. from pydantic import BaseModel, Field, PositiveInt
  3. class OpenSearchConfigs(BaseModel):
  4. """
  5. OpenSearch configs
  6. """
  7. OPENSEARCH_HOST: Optional[str] = Field(
  8. description='OpenSearch host',
  9. default=None,
  10. )
  11. OPENSEARCH_PORT: PositiveInt = Field(
  12. description='OpenSearch port',
  13. default=9200,
  14. )
  15. OPENSEARCH_USER: Optional[str] = Field(
  16. description='OpenSearch user',
  17. default=None,
  18. )
  19. OPENSEARCH_PASSWORD: Optional[str] = Field(
  20. description='OpenSearch password',
  21. default=None,
  22. )
  23. OPENSEARCH_SECURE: bool = Field(
  24. description='whether to use SSL connection for OpenSearch',
  25. default=False,
  26. )