Documentation ¶
Overview ¶
Package connmanager tracks open connections maping storage proposal CID -> StorageDealStream
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnManager ¶
type ConnManager struct {
// contains filtered or unexported fields
}
ConnManager is a simple threadsafe map of proposal CID -> network deal stream
func (*ConnManager) AddStream ¶
func (c *ConnManager) AddStream(proposalCid cid.Cid, s network.StorageDealStream) error
AddStream adds the given stream to the conn manager, and errors if one already exists for the given proposal CID
func (*ConnManager) DealStream ¶
func (c *ConnManager) DealStream(proposalCid cid.Cid) (network.StorageDealStream, error)
DealStream returns the deal stream for the given proposal, or an error if not present
func (*ConnManager) Disconnect ¶
func (c *ConnManager) Disconnect(proposalCid cid.Cid) error
Disconnect removes the given connection from the conn manager and closes the stream. It errors if an error occurs closing the stream
Click to show internal directories.
Click to hide internal directories.