helpers

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromAddressToStrings

func FromAddressToStrings(addresses []common.Address) []string

func FromStringsToAddresses

func FromStringsToAddresses(addresses []string) []common.Address

func GetDirSize

func GetDirSize(dirPath string) (float64, error)

GetDirSize calculates the total size of a directory and its subdirectories in megabytes using concurrent goroutines.

func GetStorageCachePath

func GetStorageCachePath(network utils.Network, blockNumber string, addr common.Address) string

func IsDir added in v1.0.0

func IsDir(dirPath string) (bool, error)

IsDir checks if the given path exists and is a directory.

func IsDirAndNotEmpty added in v1.0.0

func IsDirAndNotEmpty(dirPath string) (bool, error)

IsDirAndNotEmpty checks if a given path exists, is a directory, and is not empty.

func NatsErrHandler

func NatsErrHandler(nc *nats.Conn, sub *nats.Subscription, natsErr error)

Types

type SyncDirection

type SyncDirection string
var (
	HeadSyncDirection    SyncDirection = "head"
	ArchiveSyncDirection SyncDirection = "archive"
)

func (SyncDirection) String

func (s SyncDirection) String() string

Jump to

Keyboard shortcuts

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