-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor package structure, names of things
- Define "router" in package init, register view functions defined in views module - Add test for check with custom name - use better name for check operations
- Loading branch information
1 parent
7ef60d5
commit 40e67c3
Showing
4 changed files
with
38 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
from .router import dockerflow_router | ||
from .middleware import MozlogRequestSummaryLogger | ||
from .checks import check | ||
from fastapi import APIRouter | ||
from fastapi.routing import APIRoute | ||
|
||
from .checks import register_heartbeat_check # noqa | ||
from .views import heartbeat, lbheartbeat, version | ||
|
||
router = APIRouter( | ||
tags=["Dockerflow"], | ||
routes=[ | ||
APIRoute("/__lbheartbeat__", endpoint=lbheartbeat, methods=["GET", "HEAD"]), | ||
APIRoute("/__heartbeat__", endpoint=heartbeat, methods=["GET", "HEAD"]), | ||
APIRoute("/__version__", endpoint=version, methods=["GET"]), | ||
], | ||
) |
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