Documentation ¶
Index ¶
- func WithBlockSignerDecoder(signerIndicesDecoder hotstuff.BlockSignerDecoder) func(*Handler)
- type API
- type Handler
- func (h *Handler) GetBlockByHeight(ctx context.Context, req *access.GetBlockByHeightRequest) (*access.BlockResponse, error)
- func (h *Handler) GetBlockByID(ctx context.Context, req *access.GetBlockByIDRequest) (*access.BlockResponse, error)
- func (h *Handler) GetBlockHeaderByHeight(ctx context.Context, req *access.GetBlockHeaderByHeightRequest) (*access.BlockHeaderResponse, error)
- func (h *Handler) GetBlockHeaderByID(ctx context.Context, req *access.GetBlockHeaderByIDRequest) (*access.BlockHeaderResponse, error)
- func (h *Handler) GetLatestBlock(ctx context.Context, req *access.GetLatestBlockRequest) (*access.BlockResponse, error)
- func (h *Handler) GetLatestBlockHeader(ctx context.Context, req *access.GetLatestBlockHeaderRequest) (*access.BlockHeaderResponse, error)
- func (h *Handler) GetLatestProtocolStateSnapshot(ctx context.Context, req *access.GetLatestProtocolStateSnapshotRequest) (*access.ProtocolStateSnapshotResponse, error)
- func (h *Handler) GetNetworkParameters(ctx context.Context, _ *access.GetNetworkParametersRequest) (*access.GetNetworkParametersResponse, error)
- func (h *Handler) GetNodeVersionInfo(ctx context.Context, request *access.GetNodeVersionInfoRequest) (*access.GetNodeVersionInfoResponse, error)
- type HandlerOption
- type NetworkAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBlockSignerDecoder ¶
func WithBlockSignerDecoder(signerIndicesDecoder hotstuff.BlockSignerDecoder) func(*Handler)
Types ¶
type API ¶
type API interface { NetworkAPI GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.Header, error) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flow.Header, error) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.Header, error) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, error) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Block, error) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, error) }
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(api API, options ...HandlerOption) *Handler
func (*Handler) GetBlockByHeight ¶
func (h *Handler) GetBlockByHeight( ctx context.Context, req *access.GetBlockByHeightRequest, ) (*access.BlockResponse, error)
GetBlockByHeight gets a block by height.
func (*Handler) GetBlockByID ¶
func (h *Handler) GetBlockByID( ctx context.Context, req *access.GetBlockByIDRequest, ) (*access.BlockResponse, error)
GetBlockByID gets a block by ID.
func (*Handler) GetBlockHeaderByHeight ¶
func (h *Handler) GetBlockHeaderByHeight( ctx context.Context, req *access.GetBlockHeaderByHeightRequest, ) (*access.BlockHeaderResponse, error)
GetBlockHeaderByHeight gets a block header by height.
func (*Handler) GetBlockHeaderByID ¶
func (h *Handler) GetBlockHeaderByID( ctx context.Context, req *access.GetBlockHeaderByIDRequest, ) (*access.BlockHeaderResponse, error)
GetBlockHeaderByID gets a block header by ID.
func (*Handler) GetLatestBlock ¶
func (h *Handler) GetLatestBlock( ctx context.Context, req *access.GetLatestBlockRequest, ) (*access.BlockResponse, error)
GetLatestBlock gets the latest sealed block.
func (*Handler) GetLatestBlockHeader ¶
func (h *Handler) GetLatestBlockHeader( ctx context.Context, req *access.GetLatestBlockHeaderRequest, ) (*access.BlockHeaderResponse, error)
GetLatestBlockHeader gets the latest sealed block header.
func (*Handler) GetLatestProtocolStateSnapshot ¶
func (h *Handler) GetLatestProtocolStateSnapshot(ctx context.Context, req *access.GetLatestProtocolStateSnapshotRequest) (*access.ProtocolStateSnapshotResponse, error)
GetLatestProtocolStateSnapshot returns the latest serializable Snapshot
func (*Handler) GetNetworkParameters ¶
func (h *Handler) GetNetworkParameters( ctx context.Context, _ *access.GetNetworkParametersRequest, ) (*access.GetNetworkParametersResponse, error)
func (*Handler) GetNodeVersionInfo ¶ added in v0.31.0
func (h *Handler) GetNodeVersionInfo( ctx context.Context, request *access.GetNodeVersionInfoRequest, ) (*access.GetNodeVersionInfoResponse, error)
type HandlerOption ¶
type HandlerOption func(*Handler)
HandlerOption is used to hand over optional constructor parameters
type NetworkAPI ¶
Click to show internal directories.
Click to hide internal directories.