| 108 | |
| 109 | private: |
| 110 | struct CSIPlugin |
| 111 | { |
| 112 | CSIPlugin( |
| 113 | const CSIPluginInfo& _info, |
| 114 | const string& metricsPrefix) |
| 115 | : info(_info), |
| 116 | metrics(metricsPrefix) {} |
| 117 | |
| 118 | CSIPluginInfo info; |
| 119 | Owned<ServiceManager> serviceManager; |
| 120 | Owned<VolumeManager> volumeManager; |
| 121 | Runtime runtime; |
| 122 | csi::Metrics metrics; |
| 123 | |
| 124 | // CSI plugins are initialized lazily. When a publish/unpublish call is |
| 125 | // received for a plugin which is not yet initialized, this promise is used |
| 126 | // to perform the call after initialization is complete. |
| 127 | Promise<Nothing> initialized; |
| 128 | }; |
| 129 | |
| 130 | // Attempts to load configuration for a plugin with the specified name and |
| 131 | // then initializes the plugin. If no name is specified, then all |