Documentation
¶
Overview ¶
Package events writes the reporter's JSON-lines events to stdout in the TS reporter's schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Absent ¶
type Absent struct {
Kind string `json:"kind"`
ContextSlot string `json:"contextSlot"`
SlotLimit string `json:"slotLimit"`
}
Absent is the observed value when Solana holds no finalized status for the transfer.
type AuditUnavailable ¶
type AuditUnavailable struct {
}
AuditUnavailable alerts that the audit discovery query failed.
type LightClientChanged ¶
type LightClientChanged struct {
Alert string `json:"alert"`
Previous string `json:"previous"`
Current string `json:"current"`
Slot string `json:"slot"`
}
LightClientChanged alerts that the Solana light client program changed.
type LightClientMismatch ¶
type LightClientMismatch struct {
Alert string `json:"alert"`
Pinned string `json:"pinned"`
Current string `json:"current"`
}
LightClientMismatch alerts that the light client program differs from the pinned one.
type Observation ¶
type Observation struct {
Outcome int32 `json:"outcome"`
Slot string `json:"slot"`
TransactionSignature string `json:"transactionSignature"`
}
Observation is the JSON form of a sink observation.
func ObservationOf ¶
func ObservationOf(o sinkv1.Observation) Observation
ObservationOf renders a chain observation with its slot as a decimal string and its signature as base64.
type PassError ¶
type PassError struct {
Error string `json:"error"`
}
PassError reports a failure of the whole pass.
type Resolved ¶
type Resolved struct {
Kind string `json:"kind"`
ContextSlot string `json:"contextSlot"`
Observation Observation `json:"observation"`
}
Resolved is the observed value when Solana holds a finalized status for the transfer.
type Review ¶
type Review struct {
ID string `json:"id"`
Mode string `json:"mode,omitempty"`
Audit bool `json:"audit"`
Observed any `json:"observed"`
Messages []Message `json:"messages"`
Alerts []string `json:"alerts"`
}
Review is the per-transfer review event. Mode is empty for the audit early exit.
func (Review) MarshalJSON ¶
MarshalJSON renders nil Messages and Alerts as empty arrays, like the TS reporter.
type Summary ¶
type Summary struct {
Scanned int `json:"scanned"`
Audited int `json:"audited"`
Index string `json:"index"`
Failures int `json:"failures"`
LightClientProgram string `json:"lightClientProgram"`
}
Summary is the last event of a pass.
type TransferError ¶
TransferError reports a failure while reviewing or sending for one transfer.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer serializes events as one JSON line each through a single goroutine.