Socket
Book a DemoInstallSign in
Socket

minidisc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minidisc

0.0.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

MiniDisc

Mini service discovery in Ruby

Description

I recently extracted MiniDisc from a personal project I've been working on. It offers a single line interface for common patterns in service discovery that I'd been redundantly implementing.

Under the hood it wraps the DNSSD gem and is cross compatible with services using that. It adds helpers for common tasks like matching services by name, dynamically overriding discovery, error handling, logging

Requirements

Linux

  • dns-sd
  • avahi 0.6.25+ (plus libavahi-compat-libdnssd-dev on Debian)

Usage

To broadcast a service use something like:

require "minidisc"

MiniDisc::Registry.add(:http, 8080, id: "my-service-instance1")

To discover other services use

MiniDisc::Discover.find_all(:http, id: /^my-service/) do |services|
  ...
end

Installation

gem install minidisc

or when Bundler, add this to your Gemfile

gem "minidisc"

License

Apache 2.0, See LICENSE file

Copyright (c) 2017-2019 Ari Russo

FAQs

Package last updated on 01 Mar 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.