utils

package
v0.0.0-...-1a342eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The postgres parameter counter for a given query is stored via a  uint16,
	// resulting in a parameter limit of 65535. In order to avoid reaching this limit
	// we'll utilize a batch size of 3k for inserts, well below as long as the the number
	// of columns < 20.
	BatchInsertSize int = 3_000
)
View Source
var (
	SlowThresholdMilliseconds = 200
)

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

func (Bytes) Bytes

func (b Bytes) Bytes() []byte

func (*Bytes) SetBytes

func (b *Bytes) SetBytes(bytes []byte)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(log log.Logger) Logger

func (Logger) Error

func (l Logger) Error(ctx context.Context, msg string, data ...interface{})

func (Logger) Info

func (l Logger) Info(ctx context.Context, msg string, data ...interface{})

func (Logger) LogMode

func (l Logger) LogMode(lvl logger.LogLevel) logger.Interface

func (Logger) Trace

func (l Logger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (Logger) Warn

func (l Logger) Warn(ctx context.Context, msg string, data ...interface{})

type RLPHeader

type RLPHeader types.Header

func (*RLPHeader) DecodeRLP

func (h *RLPHeader) DecodeRLP(s *rlp.Stream) error

func (*RLPHeader) EncodeRLP

func (h *RLPHeader) EncodeRLP(w io.Writer) error

func (*RLPHeader) Hash

func (h *RLPHeader) Hash() common.Hash

func (*RLPHeader) Header

func (h *RLPHeader) Header() *types.Header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL