Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface {
// RegisterBlockHash registers a blockHash for a test name.
// When a log line with this blockHash is seen, it will be associated with the test.
// If the log already arrived (buffered in unmatched), it's immediately associated.
RegisterBlockHash(testName, blockHash string)
// GetBlockLogs returns all captured block logs mapped by test name.
GetBlockLogs() map[string]json.RawMessage
// Writer returns an io.Writer that intercepts log lines, parses them,
// and passes them through to the downstream writer.
Writer() io.Writer
}
Collector intercepts log streams, parses JSON payloads from client logs, and associates them with tests using blockHash matching.
type Parser ¶
type Parser interface {
// ParseLine attempts to extract a JSON payload from a log line.
// Returns the raw JSON message and true if successful, or nil and false if the line
// doesn't contain a parseable JSON payload.
ParseLine(line string) (json.RawMessage, bool)
// ClientType returns the client type this parser is for.
ClientType() client.ClientType
}
Parser extracts JSON payloads from client log lines.
func NewBesuParser ¶
func NewBesuParser() Parser
NewBesuParser creates a new Besu log parser (stub).
func NewErigonParser ¶
func NewErigonParser() Parser
NewErigonParser creates a new Erigon log parser (stub).
func NewNethermindParser ¶
func NewNethermindParser() Parser
NewNethermindParser creates a new Nethermind log parser (stub).
func NewNimbusParser ¶
func NewNimbusParser() Parser
NewNimbusParser creates a new Nimbus log parser (stub).
func NewParser ¶
func NewParser(clientType client.ClientType) Parser
NewParser returns the appropriate parser for the given client type. Returns nil if the client type is not supported or unknown.
func NewRethParser ¶
func NewRethParser() Parser
NewRethParser creates a new Reth log parser (stub).
Click to show internal directories.
Click to hide internal directories.