Skip to content

Use dependency injection and the new generic host to register common services in the Kiota CLI #6265

Open
@calebkiage

Description

@calebkiage

Kiota needs access to some common services for cross cutting functionality e.g. logging, http clients, configuration etc. In the current state, these services are registered in the command handlers of each command and also the Server class for the RPC commands.
One issue with this is that the configuration of these common services can differ in subtle ways and updates to said configuration has to be set up in multiple places. There's also the complexity with object disposal that has to be managed at the command level right now. Using dependency injection, we can ease the management of these services and enforce consistency in the code base. It will also remove the need to manage object disposal at the command since the service provider should take care of that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions