code: func (m *pcpSingletonMetric) set(val interface{}) error {
  	if !m.t.IsCompatible(val) {
  		return errors.Errorf("value %v is incompatible with MetricType %v", val, m.t)
  	}
  
  	val = m.t.resolve(val)
  
  	if val != m.val {
  		if m.update != nil {
  			err := m.update(val)
  			if err != nil {
  				return err
  			}
  		}
  		m.val = val
  	}
  
  	return nil
  }
docs: // set Sets the current value of pcpSingletonMetric.