stream_srpc

package
v0.37.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL