mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com> Co-authored-by: Mikhail Shustov <restrry@gmail.com> Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
2.6 KiB
2.6 KiB
Home > kibana-plugin-plugins-expressions-server > ExecutionContext
ExecutionContext interface
ExecutionContext
is an object available to all functions during a single execution; it provides various methods to perform side-effects.
Signature:
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState = SerializableState>
Properties
Property | Type | Description |
---|---|---|
abortSignal | AbortSignal |
Adds ability to abort current execution. |
getExecutionContext | () => IExecutionContextContainer | undefined |
Contains the meta-data about the source of the expression. |
getKibanaRequest | () => KibanaRequest |
Getter to retrieve the KibanaRequest object inside an expression function. Useful for functions which are running on the server and need to perform operations that are scoped to a specific user. |
getSearchContext | () => ExecutionContextSearch |
Get search context of the expression. |
getSearchSessionId | () => string | undefined |
Search context in which expression should operate. |
inspectorAdapters | InspectorAdapters |
Adapters for inspector plugin. |
isSyncColorsEnabled | () => boolean |
Returns the state (true|false) of the sync colors across panels switch. |
types | Record<string, ExpressionType> |
A map of available expression types. |
variables | Record<string, unknown> |
Context variables that can be consumed using var and var_set functions. |