Documentation ¶
Index ¶
- Variables
- func BitAtVector(b []byte, i int) bool
- func BitAtVectorReversed(b []byte, i int) bool
- func DayOfSlot(slot uint64) uint64
- func DayToTime(day int64) time.Time
- func EpochOfSlot(slot uint64) uint64
- func EpochToTime(epoch uint64) time.Time
- func FormatAddCommas(n uint64) template.HTML
- func FormatAddCommasFormated(num float64, precision uint) template.HTML
- func FormatAmount(amount *big.Int, unit string, digits int) template.HTML
- func FormatAmountFormatted(amount *big.Int, unit string, digits int, maxPreCommaDigitsBeforeTrim int, ...) template.HTML
- func FormatBigAmount(amount *hexutil.Big, unit string, digits int) template.HTML
- func FormatBigNumberAddCommasFormated(val hexutil.Big, precision uint) template.HTML
- func FormatBitlist(b []byte, v []types.NamedValidator) template.HTML
- func FormatBytesAmount(amount []byte, unit string, digits int) template.HTML
- func FormatETH(num string) string
- func FormatETHAddCommasFromGwei(gwei uint64) template.HTML
- func FormatETHFromGwei(gwei uint64) string
- func FormatETHFromGweiShort(gwei uint64) string
- func FormatEthAddressLink(address []byte) template.HTML
- func FormatEthBlockHashLink(blockHash []byte) template.HTML
- func FormatEthBlockLink(blockNum uint64) template.HTML
- func FormatFloat(num float64, precision int) string
- func FormatFullETHFromGwei(gwei uint64) string
- func FormatGraffiti(graffiti []byte) template.HTML
- func FormatGraffitiString(graffiti string) string
- func FormatParticipation(v float64) template.HTML
- func FormatRecentTimeShort(ts time.Time) template.HTML
- func FormatSlashedValidator(index uint64, name string) template.HTML
- func FormatValidator(index uint64, name string) template.HTML
- func FormatValidatorWithIndex(index uint64, name string) template.HTML
- func GWeiBytesToEther(gwei []byte) decimal.Decimal
- func GWeiToEther(gwei *big.Int) decimal.Decimal
- func GetExplorerVersion() string
- func GetRedactedUrl(requrl string) string
- func GetTemplateFuncs() template.FuncMap
- func GetValidatorChurnLimit(validatorCount uint64) uint64
- func Goid() int
- func GraffitiToString(graffiti []byte) string
- func HandleSubroutinePanic(identifier string)
- func IncludeHTML(path string) template.HTML
- func LogError(err error, errorMsg interface{}, callerSkip int, ...)
- func LogFatal(err error, errorMsg interface{}, callerSkip int, ...)
- func MustParseHex(hexString string) []byte
- func ReadConfig(cfg *types.Config, path string) error
- func SliceContains(list []string, target string) bool
- func SlotToTime(slot uint64) time.Time
- func SyncCommitteeParticipation(bits []byte) float64
- func TimeToDay(timestamp uint64) uint64
- func TimeToEpoch(ts time.Time) int64
- func TimeToFirstSlotOfEpoch(timestamp uint64) uint64
- func TimeToSlot(timestamp uint64) uint64
- func WaitForCtrlC()
- func WeekOfSlot(slot uint64) uint64
- func WeiBytesToEther(wei []byte) decimal.Decimal
- func WeiToEther(wei *big.Int) decimal.Decimal
- type LogWriter
- type LogWriterHook
Constants ¶
This section is empty.
Variables ¶
var BuildRelease string
var BuildVersion string
var Buildtime string
var Config *types.Config
Config is the globally accessible configuration
Functions ¶
func BitAtVector ¶
func BitAtVectorReversed ¶
func EpochOfSlot ¶
EpochOfSlot returns the corresponding epoch of a slot
func EpochToTime ¶
EpochToTime will return a time.Time for an epoch
func FormatAddCommas ¶
func FormatAddCommasFormated ¶
func FormatAmountFormatted ¶
func FormatBigAmount ¶
func FormatBitlist ¶
func FormatBitlist(b []byte, v []types.NamedValidator) template.HTML
func FormatBytesAmount ¶
func FormatETHFromGwei ¶
func FormatETHFromGweiShort ¶
func FormatEthAddressLink ¶
func FormatEthBlockHashLink ¶
func FormatEthBlockLink ¶
func FormatFloat ¶
func FormatFullETHFromGwei ¶
func FormatGraffiti ¶
func FormatGraffitiString ¶
FormatGraffitiString formats (and escapes) the graffiti
func FormatParticipation ¶
func GWeiBytesToEther ¶
func GetExplorerVersion ¶
func GetExplorerVersion() string
func GetRedactedUrl ¶
func GetTemplateFuncs ¶
GetTemplateFuncs will get the template functions
func GetValidatorChurnLimit ¶
func GraffitiToString ¶
func HandleSubroutinePanic ¶
func HandleSubroutinePanic(identifier string)
func LogError ¶
func LogError(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogError logs an error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogError is called.
func LogFatal ¶
func LogFatal(err error, errorMsg interface{}, callerSkip int, additionalInfos ...map[string]interface{})
LogFatal logs a fatal error with callstack info that skips callerSkip many levels with arbitrarily many additional infos. callerSkip equal to 0 gives you info directly where LogFatal is called.
func MustParseHex ¶
MustParseHex will parse a string into hex
func ReadConfig ¶
ReadConfig will process a configuration
func SliceContains ¶
sliceContains reports whether the provided string is present in the given slice of strings.
func TimeToEpoch ¶
TimeToEpoch will return an epoch for a given time
func TimeToFirstSlotOfEpoch ¶
func TimeToSlot ¶
TimeToSlot returns time to slot in seconds
func WeekOfSlot ¶
WeekOfSlot returns the corresponding week of a slot
func WeiBytesToEther ¶
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
func InitLogger ¶
func InitLogger() *LogWriter
type LogWriterHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
func (*LogWriterHook) Fire ¶
func (hook *LogWriterHook) Fire(entry *logger.Entry) error
Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer
func (*LogWriterHook) Levels ¶
func (hook *LogWriterHook) Levels() []logger.Level