craigerl / aprsd

Amateur radio APRS daemon which listens for messages and responds. By KM6LYW.
Apache License 2.0
120 stars 19 forks source link

Reworked the stats making the rpc server obsolete. #159

Closed hemna closed 2 months ago

hemna commented 3 months ago

This patch implements a new stats collector paradigm which uses the typing Protocol. Any object that wants to supply stats to the collector has to implement the aprsd.stats.collector.StatsProducer protocol, which at the current time is implementing a stats() method on the object.

Then register the stats singleton producer with the collector by calling collector.Collector().register_producer()

This only works if the stats producer object is a singleton.