Documentation ¶
Index ¶
- func BlockBodiesPID(n *utils.Network) protocol.ID
- func BlockHeadersPID(n *utils.Network) protocol.ID
- func CurrentBlockHeaderPID(n *utils.Network) protocol.ID
- func EventsPID(n *utils.Network) protocol.ID
- func ReceiptsPID(n *utils.Network) protocol.ID
- func TransactionsPID(n *utils.Network) protocol.ID
- type Client
- func (c *Client) RequestBlockBodies(ctx context.Context, req *spec.BlockBodiesRequest) (iter.Seq[*spec.BlockBodiesResponse], error)
- func (c *Client) RequestBlockHeaders(ctx context.Context, req *spec.BlockHeadersRequest) (iter.Seq[*spec.BlockHeadersResponse], error)
- func (c *Client) RequestCurrentBlockHeader(ctx context.Context, req *spec.CurrentBlockHeaderRequest) (iter.Seq[*spec.BlockHeadersResponse], error)
- func (c *Client) RequestEvents(ctx context.Context, req *spec.EventsRequest) (iter.Seq[*spec.EventsResponse], error)
- func (c *Client) RequestReceipts(ctx context.Context, req *spec.ReceiptsRequest) (iter.Seq[*spec.ReceiptsResponse], error)
- func (c *Client) RequestTransactions(ctx context.Context, req *spec.TransactionsRequest) (iter.Seq[*spec.TransactionsResponse], error)
- type Handler
- func (h *Handler) BlockBodiesHandler(stream network.Stream)
- func (h *Handler) BlockHeadersHandler(stream network.Stream)
- func (h *Handler) CurrentBlockHeaderHandler(stream network.Stream)
- func (h *Handler) EventsHandler(stream network.Stream)
- func (h *Handler) ReceiptsHandler(stream network.Stream)
- func (h *Handler) TransactionsHandler(stream network.Stream)
- type NewStreamFunc
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentBlockHeaderPID ¶ added in v0.10.0
Todo: consider merging this with BlockHeadersPID
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(newStream NewStreamFunc, snNetwork *utils.Network, log utils.SimpleLogger) *Client
func (*Client) RequestBlockBodies ¶ added in v0.7.0
func (c *Client) RequestBlockBodies(ctx context.Context, req *spec.BlockBodiesRequest) (iter.Seq[*spec.BlockBodiesResponse], error)
func (*Client) RequestBlockHeaders ¶ added in v0.7.0
func (c *Client) RequestBlockHeaders( ctx context.Context, req *spec.BlockHeadersRequest, ) (iter.Seq[*spec.BlockHeadersResponse], error)
func (*Client) RequestCurrentBlockHeader ¶ added in v0.10.0
func (c *Client) RequestCurrentBlockHeader( ctx context.Context, req *spec.CurrentBlockHeaderRequest, ) (iter.Seq[*spec.BlockHeadersResponse], error)
func (*Client) RequestEvents ¶ added in v0.7.0
func (c *Client) RequestEvents(ctx context.Context, req *spec.EventsRequest) (iter.Seq[*spec.EventsResponse], error)
func (*Client) RequestReceipts ¶ added in v0.7.0
func (c *Client) RequestReceipts(ctx context.Context, req *spec.ReceiptsRequest) (iter.Seq[*spec.ReceiptsResponse], error)
func (*Client) RequestTransactions ¶ added in v0.7.0
func (c *Client) RequestTransactions(ctx context.Context, req *spec.TransactionsRequest) (iter.Seq[*spec.TransactionsResponse], error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(bcReader blockchain.Reader, log utils.SimpleLogger) *Handler
func (*Handler) BlockBodiesHandler ¶ added in v0.7.0
func (*Handler) BlockHeadersHandler ¶ added in v0.7.0
func (*Handler) CurrentBlockHeaderHandler ¶ added in v0.10.0
func (*Handler) EventsHandler ¶ added in v0.7.0
func (*Handler) ReceiptsHandler ¶ added in v0.7.0
func (*Handler) TransactionsHandler ¶ added in v0.7.0
type NewStreamFunc ¶
type Stream ¶
Stream represents a series of messages that can be accessed by invoking Stream a number of times. After stream is entirely consumed of elements, it should return false as its second return value
func StaticStream ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.