Documentation ¶
Overview ¶
Package arrowhs provides functionality to read and process query responses using Cap'n Proto for message decoding and Apache Arrow for data processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryResponseInterface ¶
type QueryResponseInterface interface { // AppendBlockData appends a block to the query response data. AppendBlockData(block types.Block) // AppendTransactionData appends a transaction to the query response data. AppendTransactionData(transaction types.Transaction) // AppendLogData appends a log to the query response data. AppendLogData(log types.Log) // AppendTraceData appends a trace to the query response data. AppendTraceData(trace types.Trace) // GetData returns the data response. GetData() types.DataResponse // SetArchiveHeight sets the archive height in the query response. SetArchiveHeight(*big.Int) // SetNextBlock sets the next block in the query response. SetNextBlock(*big.Int) // HasNextBlock checks if the next block is set in the query response. HasNextBlock() bool // SetTotalExecutionTime sets the total execution time in the query response. SetTotalExecutionTime(uint64) // HasRollbackGuard checks if the rollback guard is set in the query response. HasRollbackGuard() bool // SetRollbackGuard sets the rollback guard in the query response. SetRollbackGuard(*types.RollbackGuard) // GetRollbackGuard returns the rollback guard from the query response. GetRollbackGuard() *types.RollbackGuard }
QueryResponseInterface defines the interface for handling query response data.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is responsible for reading and processing query responses.
func NewQueryResponseReader ¶
func NewQueryResponseReader(bReader io.ReadCloser) (*Reader, error)
NewQueryResponseReader creates a new Reader instance from an io.ReadCloser.
func NewReader ¶
func NewReader(bReader io.ReadCloser, response QueryResponseInterface) (*Reader, error)
NewReader initializes a Reader with a provided io.ReadCloser and QueryResponseInterface.
func (*Reader) Close ¶
Close closes the reader. Currently, it does nothing but is provided for future use.
func (*Reader) GetQueryResponse ¶
func (r *Reader) GetQueryResponse() *types.QueryResponse
GetQueryResponse returns the query response.
func (*Reader) GetRootQueryResponse ¶
func (r *Reader) GetRootQueryResponse() hypersynccapnp.QueryResponse
GetRootQueryResponse returns the root query response.