Skip to content

ebostijancic/fluxter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluxter

Build Status Hex Version

Fluxter is an InfluxDB writer for Elixir. It uses InfluxDB's line protocol over UDP.

Installation

Add Fluxter as a dependency to your mix.exs file:

def application() do
  [applications: [:fluxter]]
end

defp deps() do
  [{:fluxter, "~> 0.1"}]
end

Then run mix deps.get in your shell to fetch the dependencies.

Usage

A module that uses Fluxter becomes an InfluxDB connection pool:

defmodule MyApp.Fluxter do
  use Fluxter
end

Each Fluxter pool provides a start_link/0 function that starts the pool and connects to InfluxDB; this function needs to be invoked before the pool can be used. Usually, you won't call start_link/0 directly as you'll want to use a Fluxter pool as part of your application's supervision tree. For example:

def start(_type, _args) do
  import Supervisor.Spec

  children = [
    supervisor(MyApp.Fluxter, []),
    #...
  ]
  Supervisor.start_link(children, strategy: :one_for_one)
end

Once the Fluxter pool is started, its write/2,3 and measure/2,3,4 functions can successfully be used to send points to the data store.

Much more information can be found in the documentation.

License

This software is licensed under the ISC license.

About

An InfluxDB writer for Elixir

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%