utils

package
v0.0.0-...-bba5479 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockChainRpc = "https://evmrpc-testnet.0g.ai"
)

Variables

This section is empty.

Functions

func GetBlockNumber

func GetBlockNumber(url string) (uint64, error)

func PeekUrlHost

func PeekUrlHost(rawURL string) (string, error)

func PrettyElapsed

func PrettyElapsed(elapsed time.Duration) string

func ReplacePort

func ReplacePort(originalURL string, newPort string) (string, error)

func SafeStartGoroutine

func SafeStartGoroutine(do func())

func StartAction

func StartAction(action func(), wg *sync.WaitGroup)

func StartDeamon

func StartDeamon(do func())

Types

type SizedWaitGroup

type SizedWaitGroup struct {
	Size int
	// contains filtered or unexported fields
}

func NewSizedWaitGroup

func NewSizedWaitGroup(limit int) SizedWaitGroup

func (*SizedWaitGroup) Add

func (s *SizedWaitGroup) Add()

func (*SizedWaitGroup) AddWithContext

func (s *SizedWaitGroup) AddWithContext(ctx context.Context) error

func (*SizedWaitGroup) Done

func (s *SizedWaitGroup) Done()

func (*SizedWaitGroup) Wait

func (s *SizedWaitGroup) Wait()

Jump to

Keyboard shortcuts

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