mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
add route statisticsCallback
This commit is contained in:
parent
341f05d25a
commit
d40432e5b8
|
|
@ -18,14 +18,16 @@
|
|||
|
||||
class Route:
|
||||
"""!Class for single routing points"""
|
||||
def __init__(self, name, callback):
|
||||
def __init__(self, name, callback, statsCallback=None):
|
||||
"""!Create a instance of an route point
|
||||
|
||||
@param name: name of the route point
|
||||
@param callback: instance of the callback function
|
||||
@param statsCallback: instance of the callback to get statistics (None)
|
||||
"""
|
||||
self._name = name
|
||||
self._callback = callback
|
||||
self._statsCallback = statsCallback
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
|
@ -36,3 +38,8 @@ class Route:
|
|||
def callback(self):
|
||||
"""!Porperty to get the callback function instance"""
|
||||
return self._callback
|
||||
|
||||
@property
|
||||
def statistics(self):
|
||||
"""!Porperty to get the statistics from instance"""
|
||||
return self._statsCallback
|
||||
|
|
|
|||
Loading…
Reference in a new issue