{"id":18544645,"url":"https://github.com/instructure/instructure_registrar","last_synced_at":"2025-07-27T06:11:08.601Z","repository":{"id":56877782,"uuid":"41564931","full_name":"instructure/instructure_registrar","owner":"instructure","description":null,"archived":false,"fork":false,"pushed_at":"2015-10-05T20:50:14.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-20T19:04:18.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instructure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-28T19:23:01.000Z","updated_at":"2015-10-05T20:48:59.000Z","dependencies_parsed_at":"2022-08-20T23:10:12.200Z","dependency_job_id":null,"html_url":"https://github.com/instructure/instructure_registrar","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Finstructure_registrar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Finstructure_registrar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Finstructure_registrar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Finstructure_registrar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instructure","download_url":"https://codeload.github.com/instructure/instructure_registrar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254282578,"owners_count":22045126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:17:11.691Z","updated_at":"2025-05-15T05:34:14.269Z","avatar_url":"https://github.com/instructure.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InstructureRegistrar\n\nInstructureRegistrar is a Ruby library for registering and retrieving service\ninformation from a central etcd service registry.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'instructure_registrar'\n```\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\nMake sure that the following environment variables are set with the appropriate\ninformation for your local etcd instance:\n\n    REGISTRY_HOST\n    REGISTRY_PORT\n\n### Integrating with a service\n\nIn your service's project folder, create a configuration file with the following contents:\n\n    #/config/initializers/instructure_registrar.rb\n    require 'instructure_registrar'\n    require 'dotenv'\n    Dotenv.load\n\n    InstructureRegistrar.configure do |config|\n      config.registry_host = ENV['REGISTRY_HOST']# || \"http://instructure-etcd.docker\"\n      config.registry_port = ENV['REGISTRY_PORT']# || 12379\n      config.service_name  = \"sample_service_3\"\n      config.service_config = {\n        host: \"http://someservice.docker\",\n        token: 'foo',\n        option: 'bar'}\n    end\n\n    if ENV['RAILS_ENV'] == \"development\"\n      InstructureRegistrar.register\n      at_exit { InstructureRegistrar.unregister }\n    end\n\n### Looking up a service\n\nNote that your client application will need a config file similar to that in the section above, but\nunless you plan on registering your app as a service your config file will be simpler:\n\n    #/config/initializers/instructure_registrar.rb\n    require 'dotenv'\n    Dotenv.load\n    require 'instructure_registrar'\n\n    InstructureRegistrar.configure do |config|\n      config.registry_host = ENV.fetch('REGISTRY_HOST') || \"http://instructure-etcd.docker\"\n      config.registry_port = ENV.fetch(\"REGISTRY_PORT\") || 12379\n    end\n\nThen, to fetch connection information for a given service:\n\n    require 'instructure_registrar'\n    @some_service_url = InstructureRegistrar.get_service('some_service_name')\n\nThis will return all keys and values associated with the service.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Finstructure_registrar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstructure%2Finstructure_registrar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Finstructure_registrar/lists"}