mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
14 lines
353 B
Python
14 lines
353 B
Python
from typing import (
|
|
TYPE_CHECKING,
|
|
Awaitable,
|
|
Callable,
|
|
NewType,
|
|
)
|
|
|
|
if TYPE_CHECKING:
|
|
from libp2p.network.stream.net_stream_interface import INetStream # noqa: F401
|
|
from libp2p.stream_muxer.abc import IMuxedStream # noqa: F401
|
|
|
|
TProtocol = NewType("TProtocol", str)
|
|
StreamHandlerFn = Callable[["INetStream"], Awaitable[None]]
|