New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openfeature-flagd-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-flagd-provider

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OpenFeature flagd Provider for Ruby

This is the Ruby provider implementation of the flagd

Installation

Add this line to your application's Gemfile:

gem 'openfeature-flagd-provider'

And then execute:

bundle install

Or install it yourself as:

gem install openfeature-flagd-provider

Usage

The OpenFeature::Flagd supports multiple configuration options that dictate how the SDK communicates with flagd. Options can be defined in the constructor or as environment variables, with constructor options having the highest precedence.

Available options

Option nameEnvironment variable nameTypeDefault
hostFLAGD_HOSTstringlocalhost
portFLAGD_PORTnumber8013
tlsFLAGD_TLSbooleanfalse
unix_socket_pathFLAGD_SOCKET_PATHstringnil
root_cert_pathFLAGD_SERVER_CERT_PATHstringnil

Example using TCP

OpenFeature::SDK.configure do |config|
    # your provider of choice
    config.provider = OpenFeature::Flagd::Provider.configure do |provider_config|
        provider_config.host = "localhost"
        provider_config.port = 8013
        provider_config.tls = false
    end
end

Example using a Unix socket

OpenFeature::SDK.configure do |config|
    # your provider of choice
    config.provider = OpenFeature::Flagd::Provider.configure do |provider_config|
        provider_config.unix_socket_path = "tmp/flagd.sock"
    end
end

Example using a secure connection

OpenFeature::SDK.configure do |config|
    # your provider of choice
    config.provider = OpenFeature::Flagd::Provider.configure do |provider_config|
        provider_config.host = "localhost"
        provider_config.port = 8013
        provider_config.tls = true
        provider_config.root_cert_path = './ca.pem'
    end
end

If no environment variables are set the default configuration is set

Contributing

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

FAQs

Package last updated on 30 Aug 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