Try<Owned<VolumeManager>> VolumeManager::create( const http::URL& agentUrl, const string& rootDir, const CSIPluginInfo& info, const hashset<Service>& services, const string& containerPrefix, const Option<string>& authToken, Metrics* metrics) { if (services.empty()) { return Error( "Must specify at least one service for CSI plugin type '" + info.type() + "' and name '" + info.name() + "'"); } return new v0::VolumeManager( agentUrl, rootDir, info, services, containerPrefix, authToken, Runtime(), metrics); }
virtual Future<hashset<string>> watch( const hashset<string>& knownProfiles, const ResourceProviderInfo& resourceProviderInfo) override { // If the input set of profiles is empty, that means the caller is in sync // with this module. Hence, we return a future that will never be satisified // because this module will never return a non-empty set of profiles. if (knownProfiles.empty()) { return Future<hashset<string>>(); } return hashset<string>::EMPTY; }