Sha256: c91278335ebc6959ea0d5de277f661823871c887b52b29cf08ee9599ac75441a

Contents?: true

Size: 515 Bytes

Versions: 10

Compression:

Stored size: 515 Bytes

Contents

import Foundation

import KituraNet
import SwiftyJSON

import StatsD

public class HealthHandler {

  public static func handle(statsD: StatsDProtocol, complete: (status: HTTPStatusCode, data: JSON?) -> Void) -> Void {
    statsD.timer(bucket: "\(Buckets.Application.rawValue).\(Buckets.HealthHandler.rawValue).\(Buckets.Get.rawValue).\(Buckets.Timing.rawValue)") {
      let result = HealthHandlerResponse(statusMessage: "OK")
      complete(status: HTTPStatusCode.OK, data: JSON(result.serialize()))
    }
  }

}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
minke-generator-swift-0.5 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.4 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.2.2 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.2.1 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.2.0 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.1.8 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.1.7 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.1.6 lib/generators/swift/scaffold/src/Sources/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.1.4 lib/generators/swift/scaffold/src/<%= application_name %>/handlers/HealthHandler.swift
minke-generator-swift-0.1.0 lib/generators/swift/scaffold/src/<%= application_name %>/handlers/HealthHandler.swift