[New platform] Extend request handler with request scoped core capabilities #33783
Labels
enhancement
New value added to drive a business result
Feature:New Platform
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Description
Updated:
New implementation should be based on RFC #36509
Outdated
Reactive nature of core services implies that core capabilities can be updated during the lifecycle. ```js setup(core){ const client = core.elasticsearch.adminClient$.pipe(first()).toPromise(); ... handler(request){ // - client can be outdated // - we have to bind a scope manually // - we provide full access to raw request const result = await client.asScoped(request, '...') }) ``` To prevent core capabilities from stalling we can provide an alternative mechanism that - always exposes the fresh version of core capabilities - binds them to the current request automaticallyBesides of scoped
core
services we may want to provide request scoped plugin capabilities.Implementation
TBD
Related discussions
The previous discussion about request-scoped services with examples is in the umbrella issue #12464
The text was updated successfully, but these errors were encountered: