Dependency injection means a service receives what it needs instead of creating everything by itself. This keeps business code small and makes external systems easier to replace.
`use` receives values registered in app or library options.
`adapt` and `plug` are good for replaceable tools such as storage, cache, or message APIs.
`service` connects one service to another service.
`env` reads runtime configuration without passing it through every function.
Register With use
`AkanOption.use()` is a simple place to prepare global values. Put API clients, generated secrets, host values, and shared settings there.
Option registers values
Service receives values
Adapt And Plug
Use an adaptor when a tool has behavior and can be replaced later. The service only asks for the role it needs.
Declare adaptor
Plug adaptor into service
Inject Services
Use `service()` when one service needs another service's business method. This is clearer than importing and creating the other service yourself.
Service to service
Read Environment
`env()` is useful when the service needs runtime identity such as app name, operation mode, hostname, or a feature flag.
Environment value
Tips
Do not create external clients inside every method. Register them once with `use` or `adapt`.
Use `service()` for business collaboration, and `plug()` for replaceable infrastructure.
Keep secrets in env/options and inject prepared clients, not raw credentials, when possible.
If a value is shared across many services, `AkanOption.use()` is usually the cleanest home.