File size: 1,714 Bytes
a8b3f00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from typing import Optional

from pydantic import Field, NonNegativeInt, PositiveInt
from pydantic_settings import BaseSettings


class TidbOnQdrantConfig(BaseSettings):
    """
    Tidb on Qdrant configs
    """

    TIDB_ON_QDRANT_URL: Optional[str] = Field(
        description="Tidb on Qdrant url",
        default=None,
    )

    TIDB_ON_QDRANT_API_KEY: Optional[str] = Field(
        description="Tidb on Qdrant api key",
        default=None,
    )

    TIDB_ON_QDRANT_CLIENT_TIMEOUT: NonNegativeInt = Field(
        description="Tidb on Qdrant client timeout in seconds",
        default=20,
    )

    TIDB_ON_QDRANT_GRPC_ENABLED: bool = Field(
        description="whether enable grpc support for Tidb on Qdrant connection",
        default=False,
    )

    TIDB_ON_QDRANT_GRPC_PORT: PositiveInt = Field(
        description="Tidb on Qdrant grpc port",
        default=6334,
    )

    TIDB_PUBLIC_KEY: Optional[str] = Field(
        description="Tidb account public key",
        default=None,
    )

    TIDB_PRIVATE_KEY: Optional[str] = Field(
        description="Tidb account private key",
        default=None,
    )

    TIDB_API_URL: Optional[str] = Field(
        description="Tidb API url",
        default=None,
    )

    TIDB_IAM_API_URL: Optional[str] = Field(
        description="Tidb IAM API url",
        default=None,
    )

    TIDB_REGION: Optional[str] = Field(
        description="Tidb serverless region",
        default="regions/aws-us-east-1",
    )

    TIDB_PROJECT_ID: Optional[str] = Field(
        description="Tidb project id",
        default=None,
    )

    TIDB_SPEND_LIMIT: Optional[int] = Field(
        description="Tidb spend limit",
        default=100,
    )