| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // NewString creates a new String StatsObject with the given name and |
| // returns a pointer to it. |
| func NewString(name string) *String { |
| node := findNodeLocked(name, true) |
| // String implements the StatsObject interface. |
| // Set sets the value of the object. |
| func (s *String) Set(value string) { |
| s.lastUpdate = time.Now() |
| // LastUpdate returns the time at which the object was last updated. |
| func (s *String) LastUpdate() time.Time { |
| // Value returns the current value of the object. |
| func (s *String) Value() interface{} { |