mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 22:50:54 +00:00
Add clean-up logics into TrioSubscriptionAPI
Register an `unsubscribe_fn` when initializing the TrioSubscriptionAPI. `unsubscribe_fn` is called when subscription is unsubscribed.
This commit is contained in:
@ -7,3 +7,5 @@ from .pb import rpc_pb2
|
||||
SyncValidatorFn = Callable[[ID, rpc_pb2.Message], bool]
|
||||
AsyncValidatorFn = Callable[[ID, rpc_pb2.Message], Awaitable[bool]]
|
||||
ValidatorFn = Union[SyncValidatorFn, AsyncValidatorFn]
|
||||
|
||||
UnsubscribeFn = Callable[[], Awaitable[None]]
|
||||
|
||||
Reference in New Issue
Block a user