Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

injector: Add two operation modes while registering injections #13

Open
Jictyvoo opened this issue Apr 14, 2023 · 0 comments
Open

injector: Add two operation modes while registering injections #13

Jictyvoo opened this issue Apr 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jictyvoo
Copy link
Member

Add a Injector config to set two distinct modes, RegisterAppendMode, RegisterSingleMode

  • RegisterSingleMode, as it currently works, only register one and then panic (default)
  • RegisterAppendMode, will start to register every element normally, but after the second injection with same key, it will be saved on cache as an array
    • For elements that has more than one registered element, Get will panic

Mostly in implementation changes, it most affect only storage and cacheType config

@Jictyvoo Jictyvoo added the enhancement New feature or request label Apr 14, 2023
@Jictyvoo Jictyvoo self-assigned this Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant