Sha256: 11d1aa4b40762b92573c63e6bc86f7cc2dd9225df3877cce9016263685dbe710

Contents?: true

Size: 735 Bytes

Versions: 39

Compression:

Stored size: 735 Bytes

Contents

class KuberKit::Core::Registries::RegistryStore
  def add(registry)
    store.add(registry.name, registry)
  end

  def get(registry_name)
    registry = get_from_configuration(registry_name) || 
               get_global(registry_name)

    registry
  end

  def get_global(registry_name)
    store.get(registry_name)
  end

  def get_from_configuration(registry_name)
    registries = KuberKit.current_configuration.registries
    registries[registry_name]
  end

  def default_registry
    @default_registry ||= KuberKit::Core::Registries::Registry.new(:default)
  end

  def reset!
    store.reset!
  end

  private
    def store
      @@store ||= KuberKit::Core::Store.new(KuberKit::Core::Registries::AbstractRegistry)
    end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
kuber_kit-0.5.5 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.5.4 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.5.3 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.5.2 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.5.1 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.5.0 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.9 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.8 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.7 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.6 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.5 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.4 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.3 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.2 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.1 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.4.0 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.3.11 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.3.10 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.3.9 lib/kuber_kit/core/registries/registry_store.rb
kuber_kit-0.3.8 lib/kuber_kit/core/registries/registry_store.rb