// NewPCPGaugeVector creates a new instance of a PCPGaugeVector.
// It requires a name and map of instance names to their values.
// Optionally, it can also accept a couple of strings providing more details
// about the metric.
NewPCPGaugeVector creates a new instance of a PCPGaugeVector.
It requires a name and map of instance names to their values.
Optionally, it can also accept a couple of strings providing more details
about the metric.
// NewPCPGaugeVector creates a new instance of a PCPGaugeVector . // It requires a name and map of instance names to their values . // Optionally it can also accept a couple of strings providing more details // about the metric .
func NewPCPGaugeVector(values map[string]float64, name string, desc ...string) (*PCPGaugeVector, error) {
	vals := make(Instances)
	for k, v := range values {
		vals[k] = v
	}
	im, err := generateInstanceMetric(vals, name, vals.Keys(), DoubleType, InstantSemantics, OneUnit, desc...)
	if err != nil {
		return nil, err
	}
	return &PCPGaugeVector{im, sync.RWMutex{}}, nil
}
func NewPCPGaugeVector ( values map [ string ] float64 , name string , desc ... string ) ( * PCPGaugeVector , error ) { vals := make ( Instances ) for k , v := range values { vals [ k ] = v } im , err := generateInstanceMetric ( vals , name , vals . Keys ( ) , DoubleType , InstantSemantics , OneUnit , desc ... ) if err != nil { return nil , err } return & PCPGaugeVector { im , sync . RWMutex { } } , nil }
NewPCPGaugeVector creates a new instance of a PCPGaugeVector.
NewPCPGaugeVector creates a new instance of a PCPGaugeVector .