Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType classifies an action log entry.
const ( TypeTx ActionType = "tx" TypeQuery ActionType = "query" TypeWorkflow ActionType = "workflow" TypeProvider ActionType = "provider" TypeContext ActionType = "context" TypeConsole ActionType = "console" TypeFaucet ActionType = "faucet" TypeError ActionType = "error" )
type Entry ¶
type Entry struct {
Timestamp time.Time `json:"ts"`
Type ActionType `json:"type"`
Action string `json:"action"`
TxHash string `json:"tx_hash,omitempty"`
Height int64 `json:"height,omitempty"`
GasUsed int64 `json:"gas_used,omitempty"`
ResultCode uint32 `json:"code,omitempty"`
DSeq uint64 `json:"dseq,omitempty"`
GSeq uint32 `json:"gseq,omitempty"`
OSeq uint32 `json:"oseq,omitempty"`
Provider string `json:"provider,omitempty"`
Account string `json:"account,omitempty"`
Params json.RawMessage `json:"params,omitempty"`
DurationMs int64 `json:"duration_ms,omitempty"`
WorkflowID string `json:"workflow_id,omitempty"`
// Step is written unconditionally (SPEC §5.4): with omitempty the first
// step of every workflow run, index 0, vanished from machine output, so
// the entry recording where a run started looked like an entry with no
// step at all.
Step int `json:"step"`
StepName string `json:"step_name,omitempty"`
Error string `json:"error,omitempty"`
Status string `json:"status,omitempty"`
}
Entry is a single action log record, serialized as one JSON line.
type Filter ¶
type Filter struct {
Type ActionType
Since time.Time
Limit int
DSeq uint64
Account string
// WorkflowID isolates the entries of a single workflow run, so two
// interleaved runs of the same workflow can be read apart.
WorkflowID string
}
Filter defines criteria for reading log entries.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is an append-only action log backed by a JSONL file. It is safe for concurrent use.