friends-of-freeswitch / switchio

asyncio powered FreeSWITCH cluster control
http://switchio.rtfd.io
Mozilla Public License 2.0
191 stars 28 forks source link

Use collections.ChainMap instead of homegrown Events type #56

Open goodboy opened 6 years ago

goodboy commented 6 years ago

Our homegrown switchio.models.Events data structure for storing event streams looks a lot like the stdlib's collections.ChainMap. The only major difference seems to be that Events supports slicing which should be the same as slicing ChainMap.maps?

I propose seeing if we can just move to ChainMap (at least a subtype of it) since it accomplishes an additional goal I had to make Events a subtype of MutableMapping.