Documentation ¶
Index ¶
- Variables
- func BlockHeightFromContext(ctx context.Context) (int64, error)
- func ChainIDFromContext(ctx context.Context) (string, error)
- func RemoteIPAddrFromContext(ctx context.Context) (string, bool)
- func TraceIDFromContext(ctx context.Context) (context.Context, string)
- func TxHashFromContext(ctx context.Context) (string, error)
- func WithBlockHeight(ctx context.Context, h int64) context.Context
- func WithChainID(ctx context.Context, chainID string) context.Context
- func WithRemoteIPAddr(ctx context.Context, addr string) context.Context
- func WithTraceID(ctx context.Context, tID string) context.Context
- func WithTxHash(ctx context.Context, txHash string) context.Context
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RemoteIPAddrFromContext ¶
RemoteIPAddrFromContext returns the remote IP addr value stored in ctx, if any.
func TraceIDFromContext ¶
TraceIDFromContext get traceID from context (add one if none is set).
func WithRemoteIPAddr ¶
WithRemoteIPAddr wrap the context into a new context and embed the ip addr as a key.
func WithTraceID ¶
WithTraceID returns a context with a traceID value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.