buildgrid.server.cleanup.janitor.config module
- class buildgrid.server.cleanup.janitor.config.S3Config(*, access_key: str, bucket_regex: str, endpoint: str, path_prefix: str, hash_prefix_size: int = 0, secret_key: str)
Bases:
BaseModel
- access_key: str
- bucket_regex: str
- endpoint: str
- path_prefix: str
- hash_prefix_size: int
- secret_key: str
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'access_key': FieldInfo(annotation=str, required=True), 'bucket_regex': FieldInfo(annotation=str, required=True), 'endpoint': FieldInfo(annotation=str, required=True), 'hash_prefix_size': FieldInfo(annotation=int, required=False, default=0), 'path_prefix': FieldInfo(annotation=str, required=True), 'secret_key': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class buildgrid.server.cleanup.janitor.config.RedisConfig(*, db: int | None = None, dns_srv_record: str | None = None, index_prefix: str, key_batch_size: int, password: str | None = None, host: str | None = None, port: int | None = None, sentinel_master_name: str | None = None)
Bases:
BaseModel
- db: int | None
- dns_srv_record: str | None
- index_prefix: str
- key_batch_size: int
- password: str | None
- host: str | None
- port: int | None
- sentinel_master_name: str | None
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'db': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'dns_srv_record': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'host': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'index_prefix': FieldInfo(annotation=str, required=True), 'key_batch_size': FieldInfo(annotation=int, required=True), 'password': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'port': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'sentinel_master_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class buildgrid.server.cleanup.janitor.config.JanitorConfig(*, redis: RedisConfig | None = None, sleep_interval: int, s3: S3Config, sql_connection_string: str | None = None)
Bases:
BaseModel
- redis: RedisConfig | None
- sleep_interval: int
- sql_connection_string: str | None
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'redis': FieldInfo(annotation=Union[RedisConfig, NoneType], required=False, default=None), 's3': FieldInfo(annotation=S3Config, required=True), 'sleep_interval': FieldInfo(annotation=int, required=True), 'sql_connection_string': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- buildgrid.server.cleanup.janitor.config.parse_janitor_config(path: str | bytes | PathLike[str]) JanitorConfig