Latest 0.1.0
Homepage https://github.com/avito-tech/GraphiteClient
License MIT
Platforms ios 9.0, osx 10.11
Authors

GraphiteClient

Lightweight Swift framework for feeding data into Graphite and statsD.

Getting Started

Installation

Swift Package Manager

Add the dependency in your Package.swift file:

let package = Package(
    name: "project",
    dependencies: [
        .package(
            url: "https://github.com/avito-tech/GraphiteClient.git", 
            .upToNextMajor(from: "0.1.0")
        ),
    ],
    targets: [
        .target(
            name: "YourProjectName",
            dependencies: [
                "GraphiteClient"
            ]
        )
    ]
)

CocoaPods

To integrate GraphiteClient into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'GraphiteClient', '~> 0.1'

Usage

import GraphiteClient

let streamProvider = NetworkSocketOutputStreamProvider(
    host: host,
    port: port
)
let easyOutputStream = EasyOutputStream(
    outputStreamProvider: streamProvider,
    errorHandler: { stream, error in
        debugPrint("Graphite stream error: (error)")
    },
    streamEndHandler: { stream in
        debugPrint("Graphite stream has been closed")
    }
)
try easyOutputStream.open()
let client = GraphiteClient(
    easyOutputStream: easyOutputStream
)
try client.send(
    path: [
        "some",
        "metric",
        "path"
    ],
    value: 42.0,
    timestamp: Date()
)

Latest podspec

{
    "name": "AtomicModels",
    "version": "0.1.0",
    "summary": "Lightweight Swift framework for feeding data into Graphite and statsD",
    "license": "MIT",
    "authors": {
        "Hive of coders from Avito": "avito.ru"
    },
    "homepage": "https://github.com/avito-tech/GraphiteClient",
    "source": {
        "git": "https://github.com/avito-tech/GraphiteClient.git",
        "tag": "0.1.0"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "9.0",
        "osx": "10.11"
    },
    "source_files": "Sources/AtomicModels/**/*.swift"
}

Pin It on Pinterest

Share This