Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncGetBlocks ¶
func AsyncGetBlocks(ctx context.Context, sessctx context.Context, keys []cid.Cid, notif notifications.PubSub, want WantFunc, cwants func([]cid.Cid)) (<-chan blocks.Block, error)
AsyncGetBlocks take a set of block cids, a pubsub channel for incoming blocks, a want function, and a close function, and returns a channel of incoming blocks.
func SyncGetBlock ¶
SyncGetBlock takes a block cid and an async function for getting several blocks that returns a channel, and uses that function to return the block syncronously.
Types ¶
type GetBlocksFunc ¶
GetBlocksFunc is any function that can take an array of CIDs and return a channel of incoming blocks.
Click to show internal directories.
Click to hide internal directories.