-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: move
src/schema_registry
to src/karapace/api
- Loading branch information
Showing
67 changed files
with
246 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
""" | ||
Copyright (c) 2024 Aiven Ltd | ||
See LICENSE for details | ||
""" | ||
|
||
from karapace.core.container import KarapaceContainer | ||
from karapace.api.container import SchemaRegistryContainer | ||
from karapace.api.factory import create_karapace_application, karapace_schema_registry_lifespan | ||
from karapace.api.telemetry.container import TelemetryContainer | ||
|
||
import karapace.api.controller | ||
import karapace.api.factory | ||
import karapace.api.routers.compatibility | ||
import karapace.api.routers.config | ||
import karapace.api.routers.health | ||
import karapace.api.routers.master_availability | ||
import karapace.api.routers.metrics | ||
import karapace.api.routers.mode | ||
import karapace.api.routers.schemas | ||
import karapace.api.routers.subjects | ||
import karapace.api.telemetry.meter | ||
import karapace.api.telemetry.middleware | ||
import karapace.api.telemetry.setup | ||
import karapace.api.telemetry.tracer | ||
import karapace.api.user | ||
import uvicorn | ||
|
||
if __name__ == "__main__": | ||
karapace_container = KarapaceContainer() | ||
karapace_container.wire( | ||
modules=[ | ||
__name__, | ||
karapace.api.controller, | ||
karapace.api.telemetry.tracer, | ||
karapace.api.telemetry.meter, | ||
] | ||
) | ||
|
||
telemetry_container = TelemetryContainer(karapace_container=karapace_container) | ||
telemetry_container.wire( | ||
modules=[ | ||
karapace.api.telemetry.setup, | ||
karapace.api.telemetry.middleware, | ||
] | ||
) | ||
|
||
schema_registry_container = SchemaRegistryContainer( | ||
karapace_container=karapace_container, telemetry_container=telemetry_container | ||
) | ||
schema_registry_container.wire( | ||
modules=[ | ||
__name__, | ||
karapace.api.factory, | ||
karapace.api.user, | ||
karapace.api.routers.health, | ||
karapace.api.routers.metrics, | ||
karapace.api.routers.subjects, | ||
karapace.api.routers.schemas, | ||
karapace.api.routers.config, | ||
karapace.api.routers.compatibility, | ||
karapace.api.routers.mode, | ||
karapace.api.routers.master_availability, | ||
] | ||
) | ||
|
||
config = karapace_container.config() | ||
app = create_karapace_application(config=config, lifespan=karapace_schema_registry_lifespan) | ||
uvicorn.run(app, host=config.host, port=config.port, log_level=config.log_level.lower(), log_config=None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Copyright (c) 2024 Aiven Ltd | ||
See LICENSE for details | ||
""" | ||
|
||
from fastapi import FastAPI | ||
from karapace.api.routers.compatibility import compatibility_router | ||
from karapace.api.routers.config import config_router | ||
from karapace.api.routers.health import health_router | ||
from karapace.api.routers.master_availability import master_availability_router | ||
from karapace.api.routers.metrics import metrics_router | ||
from karapace.api.routers.mode import mode_router | ||
from karapace.api.routers.root import root_router | ||
from karapace.api.routers.schemas import schemas_router | ||
from karapace.api.routers.subjects import subjects_router | ||
|
||
|
||
def setup_routers(app: FastAPI) -> None: | ||
app.include_router(compatibility_router) | ||
app.include_router(config_router) | ||
app.include_router(health_router) | ||
app.include_router(mode_router) | ||
app.include_router(root_router) | ||
app.include_router(schemas_router) | ||
app.include_router(subjects_router) | ||
app.include_router(metrics_router) | ||
app.include_router(master_availability_router) |
Oops, something went wrong.