Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + var ErrDisallowedIP = errors.New("disallowed IP") + func ContextFromChanWithDeadline(chStop <-chan struct{}, timeout time.Duration) (context.Context, context.CancelFunc) + func EVMWordAddress(val common.Address) []byte + func EVMWordUint32(val uint32) []byte + func GenericEncode(types []string, values ...interface{}) ([]byte, error) + func IsHexBytes(arr []byte) bool + func MustGenericEncode(types []string, values ...interface{}) []byte type Big + func (b *Big) Cmp(c *Big) int + func (b *Big) Equal(c *Big) bool type Mailbox + func NewHighCapacityMailbox() *Mailbox v1.10.16 Oct 18, 2021 Changes in this version + const DefaultSecretSize + const FastN + const FastP + const FormatPreformatted + var Client *http.Client + var DefaultScryptParams = ScryptParams + var EmptyHash = common.Hash + var ErrNotStarted = errors.New("Not started") + var FastScryptParams = ScryptParams + var UnrestrictedClient *http.Client + func BoxOutput(errorMsgTemplate string, errorMsgValues ...interface{}) string + func Bytes32FromString(s string) [32]byte + func Bytes4FromString(s string) [4]byte + func CheckUint256(n *big.Int) error + func CombinedContext(signals ...interface{}) (context.Context, context.CancelFunc) + func ContextFromChan(chStop <-chan struct{}) (context.Context, context.CancelFunc) + func CopyFileWithMaxPerms(srcPath, dstPath string, perms os.FileMode) error + func DebugPanic() + func EVMBytesToUint64(buf []byte) uint64 + func EVMWordUint128(val *big.Int) ([]byte, error) + func EnsureDirAndMaxPerms(path string, perms os.FileMode) error + func EnsureFileMaxPerms(file *os.File, perms os.FileMode) error + func EnsureFilepathMaxPerms(filepath string, perms os.FileMode) error + func Example_boxOutput() + func HexToBig(s string) *big.Int + func HexToUint256(s string) (*big.Int, error) + func IsEmpty(bytes []byte) bool + func IsFileOwnedByChainlink(fileInfo os.FileInfo) (bool, error) + func LogIfError(err *error, msg string) + func MaxBigs(first *big.Int, bigs ...*big.Int) *big.Int + func MinUint(first uint, vals ...uint) uint + func MustUnmarshalToMap(input string) map[string]interface + func NewHash() common.Hash + func NewSecret(n int) string + func PadByteToHash(b byte) common.Hash + func RetryWithBackoff(ctx context.Context, fn func() (retry bool)) + func ReverseString(s string) string + func ToDecimal(input interface{}) (decimal.Decimal, error) + func TooPermissive(fileMode, maxAllowedPerms os.FileMode) bool + func Uint256ToBytes(x *big.Int) (uint256 []byte, err error) + func Uint256ToBytes32(n *big.Int) []byte + func Uint256ToHex(n *big.Int) (string, error) + func UnmarshalToMap(input string) (map[string]interface{}, error) + func ValidateCronSchedule(schedule string) error + func WaitGroupChan(wg *sync.WaitGroup) <-chan struct + func WithJitter(d time.Duration) time.Duration + func WrapIfError(err *error, msg string) + func WriteFileWithMaxPerms(path string, data []byte, perms os.FileMode) error + type BackoffTicker struct + C chan time.Time + func NewBackoffTicker(min, max time.Duration) BackoffTicker + func (t *BackoffTicker) Bounds() (time.Duration, time.Duration) + func (t *BackoffTicker) Start() bool + func (t *BackoffTicker) Stop() bool + func (t *BackoffTicker) Ticks() <-chan time.Time + type Big big.Int + func NewBig(i *big.Int) *Big + func NewBigI(i int64) *Big + func (b *Big) Hex() string + func (b *Big) MarshalJSON() ([]byte, error) + func (b *Big) MarshalText() ([]byte, error) + func (b *Big) Scan(value interface{}) error + func (b *Big) String() string + func (b *Big) ToInt() *big.Int + func (b *Big) UnmarshalJSON(input []byte) error + func (b *Big) UnmarshalText(input []byte) error + func (b Big) Value() (driver.Value, error) + type BigFloat big.Float + func (b *BigFloat) UnmarshalJSON(buf []byte) error + func (b *BigFloat) Value() *big.Float + func (b BigFloat) MarshalJSON() ([]byte, error) + type BigIntSlice []*big.Int + func (s BigIntSlice) Len() int + func (s BigIntSlice) Less(i, j int) bool + func (s BigIntSlice) Max() *big.Int + func (s BigIntSlice) Min() *big.Int + func (s BigIntSlice) Sort() + func (s BigIntSlice) Swap(i, j int) + type BoundedPriorityQueue struct + func NewBoundedPriorityQueue(capacities map[uint]uint) *BoundedPriorityQueue + func (q *BoundedPriorityQueue) Add(priority uint, x interface{}) + func (q *BoundedPriorityQueue) Empty() bool + func (q *BoundedPriorityQueue) Take() interface{} + type BoundedQueue struct + func NewBoundedQueue(capacity uint) *BoundedQueue + func (q *BoundedQueue) Add(x interface{}) + func (q *BoundedQueue) Empty() bool + func (q *BoundedQueue) Full() bool + func (q *BoundedQueue) Take() interface{} + type CronTicker struct + func NewCronTicker(schedule string) (CronTicker, error) + func (t *CronTicker) Start() bool + func (t *CronTicker) Stop() bool + func (t *CronTicker) Ticks() <-chan time.Time + type DependentAwaiter interface + AddDependents func(n int) + AwaitDependents func() <-chan struct{} + DependentReady func() + func NewDependentAwaiter() DependentAwaiter + type HTTPRequest struct + Config HTTPRequestConfig + Request *http.Request + func (h *HTTPRequest) SendRequest(ctx context.Context) (responseBody []byte, statusCode int, headers http.Header, err error) + type HTTPRequestConfig struct + AllowUnrestrictedNetworkAccess bool + MaxAttempts uint + SizeLimit int64 + Timeout time.Duration + type HTTPResponseTooLargeError struct + func (e *HTTPResponseTooLargeError) Error() string + type KeyedMutex struct + func (m *KeyedMutex) LockInt64(key int64) func() + type Mailbox struct + func NewMailbox(capacity uint64) *Mailbox + func (m *Mailbox) Deliver(x interface{}) (wasOverCapacity bool) + func (m *Mailbox) Notify() chan struct{} + func (m *Mailbox) Retrieve() (interface{}, bool) + func (m *Mailbox) RetrieveLatestAndClear() interface{} + type MaxBytesReader struct + func NewMaxBytesReader(rc io.ReadCloser, limit int64) *MaxBytesReader + func (mbr *MaxBytesReader) Close() error + func (mbr *MaxBytesReader) Read(p []byte) (n int, err error) + type PausableTicker struct + func NewPausableTicker(duration time.Duration) PausableTicker + func (t *PausableTicker) Destroy() + func (t *PausableTicker) Pause() + func (t *PausableTicker) Resume() + func (t PausableTicker) Ticks() <-chan time.Time + type RemoteServerError struct + func (e *RemoteServerError) Error() string + type ResettableTimer struct + func NewResettableTimer() ResettableTimer + func (t *ResettableTimer) Reset(duration time.Duration) + func (t *ResettableTimer) Stop() + func (t ResettableTimer) Ticks() <-chan time.Time + type ScryptConfigReader interface + InsecureFastScrypt func() bool + type ScryptParams struct + N int + P int + func GetScryptParams(config ScryptConfigReader) ScryptParams + type SleeperTask interface + Stop func() error + WakeUp func() + WakeUpIfStarted func() + func NewSleeperTask(worker Worker) SleeperTask + type SleeperTaskFuncWorker func() + func (fn SleeperTaskFuncWorker) Work() + type StartStopOnce struct + func (once *StartStopOnce) Healthy() error + func (once *StartStopOnce) IfStarted(f func()) (ok bool) + func (once *StartStopOnce) Ready() error + func (once *StartStopOnce) StartOnce(name string, fn func() error) error + func (once *StartStopOnce) State() StartStopOnceState + func (once *StartStopOnce) StopOnce(name string, fn func() error) error + type StartStopOnceState int32 + const StartStopOnce_Started + const StartStopOnce_Starting + const StartStopOnce_Stopped + const StartStopOnce_Stopping + const StartStopOnce_Unstarted + type TickerBase interface + Destroy func() + Pause func() + Resume func() + Ticks func() <-chan time.Time + type Worker interface + Work func() v0 v0.6.4 Jul 24, 2019 v0.6.3 Jul 9, 2019 v0.6.2 Jun 27, 2019 v0.6.1 Jun 26, 2019 v0.6.0 Jun 25, 2019 Changes in this version + const EVMWordByteLen + const EVMWordHexLen + const FormatBool + const FormatBytes + const FormatInt256 + const FormatUint256 + const HumanTimeFormat + const NewBytes32Length + var MaxInt256 = &big.Int + var MaxUint256 = &big.Int + var MinInt256 = &big.Int + var ZeroAddress = common.Address + func AddHexPrefix(str string) string + func CheckPasswordHash(password, hash string) bool + func CoerceInterfaceMapToStringMap(in interface{}) (interface{}, error) + func ConcatBytes(bufs ...[]byte) ([]byte, error) + func DecodeEthereumTx(hex string) (types.Transaction, error) + func DurationFromNow(t time.Time) time.Duration + func EIP55CapitalizedAddress(possibleAddressString string) bool + func EVMEncodeBytes(input []byte) ([]byte, error) + func EVMTranscodeBool(value gjson.Result) ([]byte, error) + func EVMTranscodeBytes(value gjson.Result) ([]byte, error) + func EVMTranscodeInt256(value gjson.Result) ([]byte, error) + func EVMTranscodeJSONWithFormat(value gjson.Result, format string) ([]byte, error) + func EVMTranscodeUint256(value gjson.Result) ([]byte, error) + func EVMWordBigInt(val *big.Int) ([]byte, error) + func EVMWordSignedBigInt(val *big.Int) ([]byte, error) + func EVMWordUint64(val uint64) []byte + func EncodeTxToHex(tx *types.Transaction) (string, error) + func FileContents(path string) (string, error) + func FileExists(name string) bool + func FilesInDir(dir string) ([]string, error) + func FormatJSON(v interface{}) ([]byte, error) + func HasHexPrefix(str string) bool + func HashPassword(password string) (string, error) + func HexToUint64(hex string) (uint64, error) + func ISO8601UTC(t time.Time) string + func IsEmptyAddress(addr common.Address) bool + func IsQuoted(input []byte) bool + func JustError(_ interface{}, err error) error + func Keccak256(in []byte) ([]byte, error) + func LogListeningAddress(address common.Address) string + func MaxInt(ints ...int) int + func MaxUint32(uints ...uint32) uint32 + func MaxUint64(uints ...uint64) uint64 + func MinBigs(first *big.Int, bigs ...*big.Int) *big.Int + func MustHash(in string) common.Hash + func NewBytes32ID() string + func NormalizedJSON(val []byte) (string, error) + func NullISO8601UTC(t null.Time) string + func ParseEthereumAddress(addressString string) (common.Address, error) + func RemoveContents(dir string) error + func RemoveHexPrefix(str string) string + func RemoveQuotes(input []byte) []byte + func Sha256(in string) (string, error) + func StringToHex(in string) string + func StripBearer(authorizationStr string) string + func ToFilterArg(q ethereum.FilterQuery) interface + func ToFilterQueryFor(fromBlock *big.Int, addresses []common.Address) ethereum.FilterQuery + func Uint64ToHex(i uint64) string + func WithoutZeroAddresses(addresses []common.Address) []common.Address + type AfterNower interface + After func(d time.Duration) <-chan time.Time + Now func() time.Time + type Afterer interface + After func(d time.Duration) <-chan time.Time + type BackoffSleeper struct + func NewBackoffSleeper() *BackoffSleeper + func (bs *BackoffSleeper) After() time.Duration + func (bs *BackoffSleeper) Duration() time.Duration + func (bs *BackoffSleeper) Reset() + func (bs *BackoffSleeper) Sleep() + type Clock struct + func (Clock) After(d time.Duration) <-chan time.Time + func (Clock) Now() time.Time + type ConstantSleeper struct + func NewConstantSleeper(d time.Duration) ConstantSleeper + func (cs ConstantSleeper) After() time.Duration + func (cs ConstantSleeper) Duration() time.Duration + func (cs ConstantSleeper) Reset() + func (cs ConstantSleeper) Sleep() + type Nower interface + Now func() time.Time + type Sleeper interface + After func() time.Duration + Duration func() time.Duration + Reset func() + Sleep func()