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 Amount(amt string) ion.Field
- func BlockHash(h string) ion.Field
- func BlockHeight(h uint64) ion.Field
- func ChainID(id string) ion.Field
- func ClientID(id string) ion.Field
- func Component(name string) ion.Field
- func Contract(addr string) ion.Field
- func Count(n int) ion.Field
- func DurationMs(ms float64) ion.Field
- func Enabled(on bool) ion.Field
- func Epoch(e uint64) ion.Field
- func ErrorMsg(err error) ion.Field
- func FromAddress(addr string) ion.Field
- func GasLimit(limit uint64) ion.Field
- func GasPrice(price uint64) ion.Field
- func GasUsed(used uint64) ion.Field
- func Host(h string) ion.Field
- func LatencyMs(ms float64) ion.Field
- func Method(m string) ion.Field
- func Network(net string) ion.Field
- func NodeID(id string) ion.Field
- func Nonce(n uint64) ion.Field
- func Operation(op string) ion.Field
- func PeerID(id string) ion.Field
- func Pending(n int) ion.Field
- func Port(p int) ion.Field
- func Proposer(id string) ion.Field
- func Protocol(p string) ion.Field
- func Reason(r string) ion.Field
- func RemoteAddr(addr string) ion.Field
- func Round(r uint64) ion.Field
- func Score(s float64) ion.Field
- func ShardID(id int) ion.Field
- func Size(bytes int64) ion.Field
- func Slot(s uint64) ion.Field
- func Success(ok bool) ion.Field
- func ToAddress(addr string) ion.Field
- func Token(t string) 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(typ string) ion.Field
- func Validator(id string) ion.Field
- func Value(val string) ion.Field
- func View(v uint64) ion.Field
- func Weight(w float64) ion.Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationMs ¶
DurationMs creates a duration field in milliseconds.
func FromAddress ¶ added in v0.1.4
FromAddress creates a sender address field.
func TxSignature ¶
TxSignature creates a transaction signature field.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.