10000 GitHub - blemale/graphite4s: A library for sending points to graphite.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

blemale/graphite4s

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphite4s

Build Status Maven Central

A library for sending points to graphite.

Project goals

The aim is to provide a lightweight graphite client.

This library respects referentially transparency and is agnostic of effect type.

Getting started

Add the dependency to your project:

libraryDependencies += "com.yannmoisan" %% "graphite4s" % Version

Usage

import java.time.Instant
import cats.effect._

object Example {
  implicit val clock: Clock[IO] = Clock.create[IO]
  val graphite = new BatchGraphite(new JavaTCPClient("localhost", 2003))
  (for {
    now <- clock.realTime(MILLISECONDS)
    req <- graphite.send(GraphitePoint("path", 42.0, Instant.ofEpochMilli(now)))
  } yield req).unsafeRunSync()
}

About

A library for sending points to graphite.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%
0