github.com/kaituanwang/hyperledger@v2.0.1+incompatible/common/metrics/gendoc/testdata/named_import.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package testdata
     8  
     9  import (
    10  	goo "github.com/hyperledger/fabric/common/metrics"
    11  )
    12  
    13  // These variables should be discovered as valid metric options
    14  // even though a named import was used.
    15  
    16  var (
    17  	NamedCounter = goo.CounterOpts{
    18  		Namespace:    "namespace",
    19  		Subsystem:    "counter",
    20  		Name:         "name",
    21  		Help:         "This is some help text",
    22  		LabelNames:   []string{"label_one", "label_two"},
    23  		StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}",
    24  	}
    25  
    26  	NamedGauge = goo.GaugeOpts{
    27  		Namespace:    "namespace",
    28  		Subsystem:    "gauge",
    29  		Name:         "name",
    30  		Help:         "This is some help text",
    31  		LabelNames:   []string{"label_one", "label_two"},
    32  		StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}",
    33  	}
    34  
    35  	NamedHistogram = goo.HistogramOpts{
    36  		Namespace:    "namespace",
    37  		Subsystem:    "histogram",
    38  		Name:         "name",
    39  		Help:         "This is some help text",
    40  		LabelNames:   []string{"label_one", "label_two"},
    41  		StatsdFormat: "%{#fqname}.%{label_one}.%{label_two}",
    42  	}
    43  )