mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
42 lines
1.2 KiB
Text
42 lines
1.2 KiB
Text
[[kibana-platform-api]]
|
|
== {kib} Core API
|
|
|
|
experimental[]
|
|
|
|
{kib} Core provides a set of low-level API's required to run all {kib} plugins.
|
|
These API's are injected into your plugin's lifecycle methods and may be invoked during that lifecycle only:
|
|
|
|
[source,typescript]
|
|
----
|
|
import type { PluginInitializerContext, CoreSetup, CoreStart } from '@kbn/core/server';
|
|
|
|
export class MyPlugin {
|
|
constructor(initializerContext: PluginInitializerContext) {}
|
|
|
|
public setup(core: CoreSetup) {
|
|
// called when plugin is setting up during Kibana's startup sequence
|
|
}
|
|
|
|
public start(core: CoreStart) {
|
|
// called after all plugins are set up
|
|
}
|
|
|
|
public stop() {
|
|
// called when plugin is torn down during Kibana's shutdown sequence
|
|
}
|
|
}
|
|
----
|
|
|
|
|
|
|
|
The services that core provides are:
|
|
|
|
* <<application-service, Application service>>
|
|
* <<configuration-service, Configuration service>>
|
|
* <<elasticsearch-service, Elasticsearch service>>
|
|
* <<http-service, HTTP service>>
|
|
* <<logging-service, Logging service>>
|
|
* <<saved-objects-service, Saved Objects service>>
|
|
* <<ui-settings-service, UI settings service>>
|
|
|
|
NOTE: Core provides the {kib} building blocks for plugins and is implemented as a collection of <<core-packages, packages>>.
|