Documentation
¶
Overview ¶
Package fields provides blockchain-specific logging field helpers.
These helpers create structured fields with consistent naming for blockchain-related data like transactions, blocks, shards, and timing.
Usage:
import "github.com/JupiterMetaLabs/ion/fields"
logger.Info("transaction routed",
fields.TxHash("abc123"),
fields.ShardID(5),
fields.LatencyMs(12.5),
)
Index ¶
- func Address(addr string) ion.Field
- func BlockHash(hash string) ion.Field
- func BlockHeight(height uint64) ion.Field
- func ChainID(id string) ion.Field
- func Component(name string) ion.Field
- func Count(n int) ion.Field
- func DurationMs(ms float64) ion.Field
- func DurationSec(sec float64) ion.Field
- func Enabled(on bool) ion.Field
- func Epoch(epoch uint64) ion.Field
- func Host(host string) ion.Field
- func LatencyMs(ms float64) ion.Field
- func Method(method string) ion.Field
- func Network(net string) ion.Field
- func NodeID(id string) ion.Field
- func Operation(op string) ion.Field
- func Pending(n int) ion.Field
- func Port(port int) ion.Field
- func Reason(r string) ion.Field
- func RemoteAddr(addr string) ion.Field
- func ReplicaIndex(idx int) ion.Field
- func Score(s float64) ion.Field
- func ShardID(id int) ion.Field
- func Size(bytes int64) ion.Field
- func Slot(slot uint64) ion.Field
- func Success(ok bool) ion.Field
- func Total(n int) ion.Field
- func TxHash(hash string) ion.Field
- func TxSignature(sig string) ion.Field
- func TxStatus(status string) ion.Field
- func TxType(txType string) ion.Field
- func Weight(w float64) ion.Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockHeight ¶
BlockHeight creates a block height field.
func DurationMs ¶
DurationMs creates a duration field in milliseconds.
func DurationSec ¶
DurationSec creates a duration field in seconds.
func ReplicaIndex ¶
ReplicaIndex creates a replica index field.
func TxSignature ¶
TxSignature creates a transaction signature field.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.