def get_lindorm_search_host()

in src/lindorm_mcp_server/utils.py [0:0]


def get_lindorm_search_host(instance_id: str, using_vpc: bool = False):
    """
    Get search host by instance id
    :param instance_id: Lindorm instance ID
    :param using_vpc: Boolean flag indicating whether to use VPC endpoint
    :return: Formatted search host URL
    """
    base_url = "lindorm.aliyuncs.com"
    if using_vpc:
        endpoint = "proxy-search-vpc"
    else:
        endpoint = "proxy-search-pub"
    return f"{instance_id}-{endpoint}.{base_url}"