Documentation ¶
Overview ¶
Package sctx provides convenience methods for context value injection and extraction.
Index ¶
- Variables
- func GetGasLimit(ctx context.Context) uint64
- func GetGasPrice(ctx context.Context) *big.Int
- func GetHost(ctx context.Context) string
- func GetOracle(ctx context.Context) ([]boson.Address, error)
- func GetRootHash(ctx context.Context) boson.Address
- func GetRootLen(ctx context.Context) int64
- func GetTargets(ctx context.Context) ([]boson.Address, error)
- func SetGasLimit(ctx context.Context, limit uint64) context.Context
- func SetGasPrice(ctx context.Context, price *big.Int) context.Context
- func SetHost(ctx context.Context, domain string) context.Context
- func SetOracle(ctx context.Context, targets string) context.Context
- func SetRootHash(ctx context.Context, rootHash boson.Address) context.Context
- func SetRootLen(ctx context.Context, len int64) context.Context
- func SetTargets(ctx context.Context, targets string) context.Context
- type HTTPRequestIDKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTargetPrefix is returned when target prefix decoding fails. ErrTargetPrefix = errors.New("error decoding prefix string") )
Functions ¶
func GetGasLimit ¶
func GetOracle ¶ added in v1.2.3
GetTargets returns the specific target pinners for a corresponding chunk by reading the prefix targets sent in the download API.
func GetRootLen ¶
func GetTargets ¶
GetTargets returns the specific target pinners for a corresponding chunk by reading the prefix targets sent in the download API.
Types ¶
type HTTPRequestIDKey ¶
type HTTPRequestIDKey struct{}
Click to show internal directories.
Click to hide internal directories.