Skip to content

feat(azure-storage): Support non-Blob services with Config::from_env #525

Description

@DerGut

Problem

As mentioned in #522, Config::from_env assumes that a user intents to parse an Azure Blob Storage config:
https://github.com/Xuanwo/reqsign/blob/e88f8878b22ef6eb61edc33fc87d46e1866eeae2/services/azure-storage/src/config.rs#L89

While some of the environment variables looked at are generic (e.g. AZURE_TENANT_ID), others are specific to blob storage (e.g. AZBLOB_ENDPOINT).

The reqsign-azure-storage::Config struct is already used to configure non-blob Azure Storage services (e.g. in OpenDAL's services-azdls and services-azfile). For this reason, I believe we should adapt Config::from_env to make it support those other services too.

Proposal

#524 proposes to add a Service enum with different types of storage services. It starts using it as an argument to Config::try_from_connection_string.
Since Config::from_env already exists it would be easiest to add another function like Config::from_env_with_service that accepts this parameter too, potentially marking the current function as deprecated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions