Internal Components¶
-
class
src.service.
Service
(name)¶ Representation of a single SERVICE.
-
class
Route
(config)¶ Each SERVICE has 1+ ROUTEs. A ROUTE has a name, route, method, status and optional query params.
-
HOME_ROUTE_NAME
= 'home'¶
-
REQD_ROUTE_ATTRS
= ['name', 'route', 'method', 'status']¶
-
static
validate_required_attrs
(route_config)¶
-
-
add_home_route
()¶ Add a simple ‘/’ response identifying the server.
-
add_route
(route_config)¶ Accept well-formatted Route config dict and add the Route to the Service.
-
ask_socket_for_status
()¶ low-level connection to the socket
not in use rn, but leaving it around in case i need it it in the future (sorry konmari)
-
generate_ledger
(filename, routes)¶ unused routes arg is for signature conformity with generate_service
-
generate_service
(filename, routes)¶ Dynamically create a Flask app defining the Service and its Routes, saving it to the given filename.
-
get_route
(name)¶ Get Route with name name.
-
insert_dockerfile
(exposed_port)¶
-
insert_requirements
()¶ Populate a requirements.txt at the given filename.
-
insert_uwsgi
(service_dir)¶
-
class
-
src.test.
analyze_test_results
(test_reports)¶
-
src.test.
run_tests
(tests, services)¶
-
src.test.
send_to_nginx
(path, request_type, headers)¶