mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-15 12:51:57 -05:00
Hemna
c5acdba6de
After adding the rpc service for aprsd server and separating the admin web REST interface, healthcheck no longer worked. The stats are available via rpc now.
15 lines
343 B
Python
15 lines
343 B
Python
import rpyc
|
|
|
|
|
|
class AuthSocketStream(rpyc.SocketStream):
|
|
"""Used to authenitcate the RPC stream to remote."""
|
|
|
|
@classmethod
|
|
def connect(cls, *args, authorizer=None, **kwargs):
|
|
stream_obj = super().connect(*args, **kwargs)
|
|
|
|
if callable(authorizer):
|
|
authorizer(stream_obj.sock)
|
|
|
|
return stream_obj
|