Documentation ¶
Index ¶
- Variables
- func All[T any](slice []T, f func(T) bool) bool
- func DerefSlice[T any](v *[]T) []T
- func Filter[T any](slice []T, f func(T) bool) []T
- func Flatten[T any](sl ...[]T) []T
- func Gzip64Decode(data string) ([]byte, error)
- func Gzip64Encode(data []byte) (string, error)
- func HexToFelt(t testing.TB, hex string) *felt.Felt
- func HexToUint64(t testing.TB, hexStr string) uint64
- func Map[T1, T2 any](slice []T1, f func(T1) T2) []T2
- func NonNilSlice[T any](sl []T) []T
- func Ptr[T any](v T) *T
- func RunAndWrapOnError(runnable func() error, existingErr error) error
- type LogLevel
- type Logger
- type Network
- func (n Network) ChainID() *felt.Felt
- func (n Network) ChainIDString() string
- func (n Network) CoreContractAddress() (common.Address, error)
- func (n Network) DefaultL1ChainID() *big.Int
- func (n Network) FeederURL() string
- func (n Network) GatewayURL() string
- func (n *Network) MarshalJSON() ([]byte, error)
- func (n Network) MarshalYAML() (interface{}, error)
- func (n Network) ProtocolID() protocol.ID
- func (n *Network) Set(s string) error
- func (n Network) String() string
- func (n *Network) Type() string
- func (n *Network) UnmarshalText(text []byte) error
- type SimpleLogger
- type Throttler
- type ZapLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrResourceBusy = errors.New("resource busy, try again")
View Source
var ErrUnknownLogLevel = errors.New("unknown log level (known: debug, info, warn, error)")
View Source
var ErrUnknownNetwork = errors.New("unknown network (known: mainnet, goerli, goerli2, integration)")
Functions ¶
func DerefSlice ¶ added in v0.8.0
func DerefSlice[T any](v *[]T) []T
func Gzip64Decode ¶ added in v0.4.0
func Gzip64Encode ¶ added in v0.4.0
func NonNilSlice ¶ added in v0.8.0
func NonNilSlice[T any](sl []T) []T
func RunAndWrapOnError ¶ added in v0.6.2
Types ¶
type LogLevel ¶
type LogLevel int
func (*LogLevel) MarshalJSON ¶ added in v0.6.0
func (LogLevel) MarshalYAML ¶ added in v0.6.0
func (*LogLevel) UnmarshalText ¶ added in v0.2.1
type Logger ¶
type Logger interface { SimpleLogger pebble.Logger }
type Network ¶
type Network int
func (Network) ChainIDString ¶ added in v0.4.0
func (Network) CoreContractAddress ¶ added in v0.4.0
func (Network) DefaultL1ChainID ¶ added in v0.4.0
func (Network) GatewayURL ¶ added in v0.4.0
GatewayURL returns URL for write commands
func (*Network) MarshalJSON ¶ added in v0.6.0
func (Network) MarshalYAML ¶ added in v0.6.0
func (Network) ProtocolID ¶ added in v0.6.0
func (*Network) UnmarshalText ¶ added in v0.2.1
type SimpleLogger ¶
type Throttler ¶ added in v0.7.4
type Throttler[T any] struct { // contains filtered or unexported fields }
func NewThrottler ¶ added in v0.7.4
func (*Throttler[T]) Do ¶ added in v0.7.4
Do lets caller acquire the resource within the context of a callback
func (*Throttler[T]) QueueLen ¶ added in v0.7.4
QueueLen returns the number of Do calls that is blocked on the resource
func (*Throttler[T]) WithMaxQueueLen ¶ added in v0.7.4
WithMaxQueueLen sets the maximum length the queue can grow to
Click to show internal directories.
Click to hide internal directories.