]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/go.opencensus.io/tag/profile_19.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / go.opencensus.io / tag / profile_19.go
similarity index 62%
rename from vendor/google.golang.org/grpc/health/grpc_health_v1/health.proto
rename to vendor/go.opencensus.io/tag/profile_19.go
index 6072fdc3b801db719dba5260027400551df6e064..f81cd0b4a78e35aa79338c46080da8cddb65f8c6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2017 gRPC authors.
+// Copyright 2018, OpenCensus Authors
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-syntax = "proto3";
+// +build go1.9
 
-package grpc.health.v1;
+package tag
 
-message HealthCheckRequest {
-  string service = 1;
-}
+import (
+       "context"
+       "runtime/pprof"
+)
 
-message HealthCheckResponse {
-  enum ServingStatus {
-       UNKNOWN = 0;
-       SERVING = 1;
-       NOT_SERVING = 2;
-  }
-  ServingStatus status = 1;
+func do(ctx context.Context, f func(ctx context.Context)) {
+       m := FromContext(ctx)
+       keyvals := make([]string, 0, 2*len(m.m))
+       for k, v := range m.m {
+               keyvals = append(keyvals, k.Name(), v)
+       }
+       pprof.Do(ctx, pprof.Labels(keyvals...), f)
 }
-
-service Health{
-  rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
-}