2021-07-24 13:55:42 +00:00
|
|
|
package core
|
2020-10-19 20:17:48 +00:00
|
|
|
|
|
|
|
func ptrInt64() *int64 {
|
|
|
|
v := int64(0)
|
|
|
|
return &v
|
|
|
|
}
|
|
|
|
|
2021-07-24 13:55:42 +00:00
|
|
|
type stats struct {
|
2020-10-19 20:17:48 +00:00
|
|
|
// use pointers to avoid a crash on 32bit platforms
|
|
|
|
// https://github.com/golang/go/issues/9959
|
2021-08-12 09:48:47 +00:00
|
|
|
CountPublishers *int64
|
|
|
|
CountReaders *int64
|
2020-10-19 20:17:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-24 13:55:42 +00:00
|
|
|
func newStats() *stats {
|
|
|
|
return &stats{
|
2021-08-12 09:48:47 +00:00
|
|
|
CountPublishers: ptrInt64(),
|
|
|
|
CountReaders: ptrInt64(),
|
2020-10-19 20:17:48 +00:00
|
|
|
}
|
|
|
|
}
|
2020-12-13 22:43:31 +00:00
|
|
|
|
2021-07-24 13:55:42 +00:00
|
|
|
func (s *stats) close() {
|
2020-12-13 22:43:31 +00:00
|
|
|
}
|