Latest 1.0.6
Homepage https://github.com/williamsjj/NSOPulseMetric
License BSD
Platforms ios 8.0, requires ARC
Dependencies AFNetworking
Authors

NSOPulseMetric enables Objective-C/Swift programs to send client latency metrics and DNS resolver mappings to NS1‘s Pulsar service. This lets NS1 provide more accurate (DNS-based) geo-load balancing for your clients.

More info on NS1 Pulsar: ns1.com/platform/pulsar

(You can sign up for an NS1 account here: ns1.com/signup).

Usage

Success and failure callbacks can be nil.

Direct metric example:

#import <NSOPulseMetric.h>
NSOPulseMetric* pulse_metric = [[NSOPulseMetric alloc] initWithAppID:@"nmkj234"
                                                           authToken:1234567890];
[pulse_metric sendLatency:1.0 //NSTimeInterval in secs
                    jobID:@"def456"
           successHandler:^{ /*Success callback...can be nil*/ }
           failureHandler:^(NSError *error) {
               NSLog(@"NSONE Latency Transmission Error (%@)",
                     error);
           }];

Resolver mapping example:

#import <NSOPulseMetric.h>
NSOPulseMetric* pulse_metric = [[NSOPulseMetric alloc] initWithAppID:@"zxs123"
                                                           authToken:1234567890];

[pulse_metric sendResolverMapping:@"abc123"
                   successHandler:^{ /*Success callback...can be nil*/ }
                   failureHandler:^(NSError *error) {
                       NSLog(@"NSONE Resolver Mapping Transmission Error (%@)",
                             error);
}];

Requirements

  • Requires AFNetworking 2.3 or greater.

Installation

NSOPulseMetric is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "NSOPulseMetric"

Or to link against the Pod locally add this to your Podfile:

pod "NSOPulseMetric",:path => '</path/to/repo/>'

Then run

pod install

Author

Jason Williams, [email protected]

License

NSOPulseMetric is available under the BSD license. See the LICENSE file for more info.

Copyright DigiTar Inc.

Latest podspec

{
    "name": "NSOPulseMetric",
    "version": "1.0.6",
    "summary": "Cocoa library for transmitting NS1 Pulsar metrics.",
    "homepage": "https://github.com/williamsjj/NSOPulseMetric",
    "license": "BSD",
    "authors": {
        "Jason J. W. Williams": "[email protected]"
    },
    "source": {
        "git": "https://github.com/williamsjj/NSOPulseMetric.git",
        "tag": "1.0.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "public_header_files": "Pod/Classes/**/*.h",
    "dependencies": {
        "AFNetworking": [
            "~> 3.0"
        ]
    }
}

Pin It on Pinterest

Share This