// NewPCPGauge creates a new PCPGauge instance.
// Tt requires an initial float64 value and a metric name for construction.
// Optionally it can also take a couple of description strings that are used as
// short and long descriptions respectively.
// Internally it creates a PCP SingletonMetric with DoubleType, InstantSemantics
// and CountUnit.
NewPCPGauge creates a new PCPGauge instance.
Tt requires an initial float64 value and a metric name for construction.
Optionally it can also take a couple of description strings that are used as
short and long descriptions respectively.
Internally it creates a PCP SingletonMetric with DoubleType, InstantSemantics
and CountUnit.
// NewPCPGauge creates a new PCPGauge instance . // Tt requires an initial float64 value and a metric name for construction . // Optionally it can also take a couple of description strings that are used as // short and long descriptions respectively . // Internally it creates a PCP SingletonMetric with DoubleType InstantSemantics // and CountUnit .
func NewPCPGauge(val float64, name string, desc ...string) (*PCPGauge, error) {
	d, err := newpcpMetricDesc(name, DoubleType, InstantSemantics, OneUnit, desc...)
	if err != nil {
		return nil, err
	}
	sm, err := newpcpSingletonMetric(val, d)
	if err != nil {
		return nil, err
	}
	return &PCPGauge{sm, sync.RWMutex{}}, nil
}
func NewPCPGauge ( val float64 , name string , desc ... string ) ( * PCPGauge , error ) { d , err := newpcpMetricDesc ( name , DoubleType , InstantSemantics , OneUnit , desc ... ) if err != nil { return nil , err } sm , err := newpcpSingletonMetric ( val , d ) if err != nil { return nil , err } return & PCPGauge { sm , sync . RWMutex { } } , nil }
NewPCPGauge creates a new PCPGauge instance.
NewPCPGauge creates a new PCPGauge instance .