package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# Functions
GenReqID generates a random ReqID.
NewBaseStream creates BaseStream as the wrapper of libp2p Stream.
ProtoIDToProtoSpec converts a ProtoID to ProtoSpec.
# Constants
ProtoIDCommonPrefix is the common prefix for stream protocol.
ProtoIDFormat is the format of stream protocol ID.
# Structs
BaseStream is the wrapper around.
ProtoSpec is the un-serialized stream proto id specification TODO: move this to service wise module since different protocol might have different protoID information.
# Interfaces
Protocol is the interface of protocol to be registered to libp2p.
Request is the interface of a stream request used for common stream utils.
Response is the interface of a stream response used for common stream utils.
Stream is the interface for streams implemented in each service.