Documentation ¶
Index ¶
- func EstablishSrpcStream(ctx context.Context, b bus.Bus, protocolID protocol.ID, ...) (srpc.PacketWriter, error)
- func NewMultiOpenStreamFunc(b bus.Bus, le *logrus.Entry, protocolID protocol.ID, srcPeer peer.ID, ...) srpc.OpenStreamFunc
- func NewOpenStreamFunc(b bus.Bus, protocolID protocol.ID, srcPeer, destPeer peer.ID, ...) srpc.OpenStreamFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstablishSrpcStream ¶
func EstablishSrpcStream( ctx context.Context, b bus.Bus, protocolID protocol.ID, srcPeer, destPeer peer.ID, transportID uint64, msgHandler srpc.PacketDataHandler, closeHandler srpc.CloseHandler, ) (srpc.PacketWriter, error)
EstablishSrpcStream establishes a srpc stream via a Bifrost stream.
transportID and srcPeer are optional starts a read pump in a goroutine
func NewMultiOpenStreamFunc ¶
func NewMultiOpenStreamFunc( b bus.Bus, le *logrus.Entry, protocolID protocol.ID, srcPeer peer.ID, destPeers []peer.ID, transportID uint64, timeoutDur time.Duration, ) srpc.OpenStreamFunc
NewMultiOpenStreamFunc builds a func which attempts multiple peers.
if timeoutDur <= 0, uses no timeout.
func NewOpenStreamFunc ¶
func NewOpenStreamFunc( b bus.Bus, protocolID protocol.ID, srcPeer, destPeer peer.ID, transportID uint64, ) srpc.OpenStreamFunc
NewOpenStreamFunc constructs a new OpenStreamFunc which establishes a connection with the given peer on-demand when a RPC call is made.
transportID and srcPeer are optional starts a read pump in a goroutine
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.