Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterSet ¶
CounterSet represents an interface found during counter push The keys to the Values map are the names of individual counters we're tracking for the interface (for instance, the names of MIB variables) and the values are the absolute values of the counters; consumers are usually interested in the deltas.
func NewCounterSet ¶
func NewCounterSet() *CounterSet
func NewCounterSetWithId ¶
func NewCounterSetWithId(id string) *CounterSet
func (*CounterSet) GetDelta ¶
func (cs *CounterSet) GetDelta(counterName string, cur uint64) uint64
Calculate the delta between the previous recorded value (in cs.Values[counterName]) and the current (new) value. Given a nil cs, return 0.
func (*CounterSet) SetValue ¶
func (cs *CounterSet) SetValue(validate map[string]string, oid string, val uint64)
func (*CounterSet) SetValueAndReturnDelta ¶
func (cs *CounterSet) SetValueAndReturnDelta(counterName string, cur uint64) uint64
Calculate the delta, save the current value, and return the delta.
Click to show internal directories.
Click to hide internal directories.