Socket
Book a DemoInstallSign in
Socket

fnord-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fnord-client

bundlerRubygems
Version
0.0.1
Version published
Maintainers
1
Created
Source

Fnord::Client

Send events to an FnordMetric server via UDP (or TCP).

Installation

Add this line to your application's Gemfile:

gem 'fnord-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fnord-client

Usage

# Connect to FnordMetric inbound stream over UDP (default)
$fnord = Fnord::Client('localhost', 1337)

# Connect to FnordMetric inbound stream over TCP
$fnord = Fnord::Client('localhost', 1337, :protocol => :tcp)

# send JSON-encoded event
$fnord.event("message_received", { :user_id => 123 })
# "{\"_type\":\"message_received\",\"user_id\":\"123\"}"

# configure FnordMetric namespace
Fnord::Client.namespace = "staging"
$fnord.event("message_received")
# "{\"_type\":\"message_received\",\"_namespace\":\"staging\"}"

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Added some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 23 Apr 2012

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