Documentation ¶
Index ¶
- type Statistics
- func (stats *Statistics) Accumulate()
- func (stats *Statistics) DecreaseDevices(device_name string, channel_name string)
- func (stats *Statistics) GetStats() *StatsData
- func (stats *Statistics) IncreaseBroadcasts()
- func (stats *Statistics) IncreaseDevices(device_name string, channel_name string)
- func (stats *Statistics) IncreaseUnicasts()
- func (stats *Statistics) PrintStats()
- func (stats *Statistics) Reset5min()
- func (stats *Statistics) StatsValueToStatsDataValue(statsValue *StatsValue) *StatsDataValue
- func (stats *Statistics) TestStats()
- type StatsData
- type StatsDataDetailValue
- type StatsDataValue
- type StatsValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Statistics ¶
type Statistics struct {
// contains filtered or unexported fields
}
func NewStatistics ¶
func NewStatistics(logger logger.Logger) *Statistics
func (*Statistics) Accumulate ¶
func (stats *Statistics) Accumulate()
func (*Statistics) DecreaseDevices ¶
func (stats *Statistics) DecreaseDevices(device_name string, channel_name string)
func (*Statistics) GetStats ¶
func (stats *Statistics) GetStats() *StatsData
func (*Statistics) IncreaseBroadcasts ¶
func (stats *Statistics) IncreaseBroadcasts()
func (*Statistics) IncreaseDevices ¶
func (stats *Statistics) IncreaseDevices(device_name string, channel_name string)
func (*Statistics) IncreaseUnicasts ¶
func (stats *Statistics) IncreaseUnicasts()
func (*Statistics) PrintStats ¶
func (stats *Statistics) PrintStats()
Shall be called periodically (every 5 minutes) to output stats
func (*Statistics) Reset5min ¶
func (stats *Statistics) Reset5min()
func (*Statistics) StatsValueToStatsDataValue ¶
func (stats *Statistics) StatsValueToStatsDataValue(statsValue *StatsValue) *StatsDataValue
func (*Statistics) TestStats ¶
func (stats *Statistics) TestStats()
type StatsData ¶
type StatsData struct { DevicesOnline *StatsDataValue `json:"devicesOnline"` UnicastsTotal *StatsDataValue `json:"unicastsTotal"` BroadcastsTotal *StatsDataValue `json:"broadcastsTotal"` Devices *[]StatsDataDetailValue `json:"devices"` Channels *[]StatsDataDetailValue `json:"channels"` }
type StatsDataDetailValue ¶
type StatsDataDetailValue struct { Key string `json:"type"` Values *StatsDataValue `json:"data"` }
type StatsDataValue ¶
type StatsValue ¶
type StatsValue struct {
// contains filtered or unexported fields
}
func NewStatsValue ¶
func NewStatsValue() *StatsValue
func (*StatsValue) Accumulate ¶
func (statsvalue *StatsValue) Accumulate()
func (*StatsValue) Reset5min ¶
func (statsvalue *StatsValue) Reset5min()
Click to show internal directories.
Click to hide internal directories.