mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
impl SRS /api/v1/clients api.
This commit is contained in:
parent
0b7fbe746e
commit
a91d98e1ad
6 changed files with 233 additions and 11 deletions
|
@ -43,3 +43,13 @@ func (m *Map[K, V]) Range(f func(key K, value V) bool) {
|
|||
func (m *Map[K, V]) Store(key K, value V) {
|
||||
m.m.Store(key, value)
|
||||
}
|
||||
|
||||
func (m *Map[K, V]) Size() uint32 {
|
||||
size := uint32(0)
|
||||
m.m.Range(func(_, _ any) bool {
|
||||
size++
|
||||
return true
|
||||
})
|
||||
|
||||
return size
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue