PluginBaseClass
The GearDBPlugin class is used to store a quick lookup table for uuid => fqdn. At least one plugin must define the "lookup" and "all" functions.
# File lib/openshift/runtime/frontend/http/plugins/apachedb.rb, line 341 def self.all Enumerator.new do |yielder| GearDB.open(GearDB::READER) do |d| d.each do |uuid, config| c = self.new(uuid, config["fqdn"], config["container_name"], config["namespace"]) yielder.yield(c) end end end end
# File lib/openshift/runtime/frontend/http/plugins/apachedb.rb, line 332 def self.lookup_by_fqdn(fqdn) GearDB.open(GearDB::READER) do |d| d.select { |k,v| v["fqdn"] == fqdn }.each do |k,v| return self.new(k, v["fqdn"], v["container_name"], v["namespace"]) end end nil end
# File lib/openshift/runtime/frontend/http/plugins/apachedb.rb, line 322 def self.lookup_by_uuid(container_uuid) GearDB.open(GearDB::READER) do |d| config = d[container_uuid] if config return self.new(container_uuid, config["fqdn"], config["container_name"], config["namespace"]) end end nil end
Generated with the Darkfish Rdoc Generator 2.