#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/21 10:01 # @File : init_consul.py # @Description : """ # Import built-in modules from flask import Flask # Import custom modules from application.libs import FlaskConsulService def init_consul(app: Flask) -> None: """ Initialize the Consul service. This function creates an instance of the FlaskConsulService class, passing the Flask application instance as an argument. This sets up the Consul service for the Flask application. Consul is a service networking solution to automate network configurations, discover services, and enable secure connectivity across any cloud or runtime. Args: app (Flask): The Flask application instance. Returns: None """ # Initialize the FlaskConsulService with the Flask application instance. # The FlaskConsulService constructor is responsible for setting up # the Consul service for the Flask application. FlaskConsulService(app)