Merge pull request #1 in MA/graphite-client from exclusive-access-return-work-result to master commit ‘c96d34a01c11ec4ba1e8487cd1f9e8f843fc2af0’: Change withExclusiveAccess method return value to work result
Merge pull request #1 in MA/graphite-client from exclusive-access-return-work-result to master
Lightweight Swift framework for feeding data into Graphite and statsD.
Add the dependency in your Package.swift file:
Package.swift
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" ] ) ] )
To integrate GraphiteClient into your Xcode project using CocoaPods, specify it in your Podfile:
Podfile
pod 'GraphiteClient', '~> 0.1'
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() )
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
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:CocoaPods
To integrate GraphiteClient into your Xcode project using CocoaPods, specify it in your
Podfile
:Usage