|
57 | 57 | import org.opensearch.flowframework.util.EncryptorUtils;
|
58 | 58 | import org.opensearch.flowframework.workflow.WorkflowProcessSorter;
|
59 | 59 | import org.opensearch.flowframework.workflow.WorkflowStepFactory;
|
| 60 | +import org.opensearch.indices.SystemIndexDescriptor; |
60 | 61 | import org.opensearch.ml.client.MachineLearningNodeClient;
|
61 | 62 | import org.opensearch.plugins.ActionPlugin;
|
62 | 63 | import org.opensearch.plugins.Plugin;
|
| 64 | +import org.opensearch.plugins.SystemIndexPlugin; |
63 | 65 | import org.opensearch.repositories.RepositoriesService;
|
64 | 66 | import org.opensearch.rest.RestController;
|
65 | 67 | import org.opensearch.rest.RestHandler;
|
|
73 | 75 | import java.util.List;
|
74 | 76 | import java.util.function.Supplier;
|
75 | 77 |
|
| 78 | +import static org.opensearch.flowframework.common.CommonValue.CONFIG_INDEX; |
76 | 79 | import static org.opensearch.flowframework.common.CommonValue.DEPROVISION_WORKFLOW_THREAD_POOL;
|
77 | 80 | import static org.opensearch.flowframework.common.CommonValue.FLOW_FRAMEWORK_THREAD_POOL_PREFIX;
|
| 81 | +import static org.opensearch.flowframework.common.CommonValue.GLOBAL_CONTEXT_INDEX; |
78 | 82 | import static org.opensearch.flowframework.common.CommonValue.PROVISION_WORKFLOW_THREAD_POOL;
|
| 83 | +import static org.opensearch.flowframework.common.CommonValue.WORKFLOW_STATE_INDEX; |
79 | 84 | import static org.opensearch.flowframework.common.CommonValue.WORKFLOW_THREAD_POOL;
|
80 | 85 | import static org.opensearch.flowframework.common.FlowFrameworkSettings.FLOW_FRAMEWORK_ENABLED;
|
81 | 86 | import static org.opensearch.flowframework.common.FlowFrameworkSettings.MAX_WORKFLOWS;
|
|
86 | 91 | /**
|
87 | 92 | * An OpenSearch plugin that enables builders to innovate AI apps on OpenSearch.
|
88 | 93 | */
|
89 |
| -public class FlowFrameworkPlugin extends Plugin implements ActionPlugin { |
| 94 | +public class FlowFrameworkPlugin extends Plugin implements ActionPlugin, SystemIndexPlugin { |
90 | 95 |
|
91 | 96 | private FlowFrameworkSettings flowFrameworkSettings;
|
92 | 97 |
|
@@ -207,4 +212,13 @@ public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings) {
|
207 | 212 | );
|
208 | 213 | }
|
209 | 214 |
|
| 215 | + @Override |
| 216 | + public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings settings) { |
| 217 | + return List.of( |
| 218 | + new SystemIndexDescriptor(CONFIG_INDEX, "Flow Framework Config index"), |
| 219 | + new SystemIndexDescriptor(GLOBAL_CONTEXT_INDEX, "Flow Framework Global Context index"), |
| 220 | + new SystemIndexDescriptor(WORKFLOW_STATE_INDEX, "Flow Framework Workflow State index") |
| 221 | + ); |
| 222 | + } |
| 223 | + |
210 | 224 | }
|
0 commit comments