Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openfeature-meta_provider

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openfeature-meta_provider

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OpenFeature Meta-Provider for Ruby

The OpenFeature::SDK::Provider::MetaProvider is a utility provider implementation that takes multiple providers for use during flag resolution. This can be helpful when an organization is migrating or consolidating feature flag providers as they transition to OpenFeature. There are usually a combination of internal and vendor providers that are combined together to handle flag resolution. If your organization has different providers for different teams, consider looking at using domains.

Installation

Coming soon!

Usage

The MetaProvider is initialized with a collection of Providers and a strategy for fetching flags from them.

# Create a MetaProvider
meta_provider = OpenFeature::SDK::Provider::MetaProvider.new(
  providers: [
    OpenFeature::SDK::ProviderInMemoryProvider.new,
    MyCustomProvider.new
  ],
  strategy: :first_match
)

# Use it as the default provider
OpenFeature.configure do |c|
  c.set_provider(meta_provider)
end

Strategies

:first_match

When :first_match is given as the strategy, each provider will be evaluated, in the order they were passed in, for the requested flag_key. The first provider where the flag_key is found will be returned, short-circuiting flag evaluation with the remaining providers. In the case of a provider error, or no matching flags, returns the default value.

Contributing

https://github.com/open-feature/ruby-sdk-contrib

FAQs

Package last updated on 16 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc