explorer

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[T any] struct {
	// contains filtered or unexported fields
}

Cache is a generic thread-safe cache that periodically refreshes data in the background

func NewCache

func NewCache[T any](updateFunc func(context.Context) (T, error), refreshRate time.Duration, logger *zap.Logger) *Cache[T]

NewCache creates a new cache with the given update function and refresh rate

func (*Cache[T]) Get

func (c *Cache[T]) Get() T

Get returns the cached data (thread-safe read)

func (*Cache[T]) GetLastUpdated

func (c *Cache[T]) GetLastUpdated() time.Time

GetLastUpdated returns when the cache was last updated

func (*Cache[T]) StartRefresh

func (c *Cache[T]) StartRefresh(ctx context.Context)

StartRefresh begins the background refresh loop Should be called in a goroutine

type Explorer

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

func NewExplorer

func NewExplorer(etl *etlserver.ETLService, e *echo.Echo, env string) *Explorer

func (*Explorer) Account

func (ex *Explorer) Account(c echo.Context) error

func (*Explorer) Block

func (ex *Explorer) Block(c echo.Context) error

func (*Explorer) Blocks

func (ex *Explorer) Blocks(c echo.Context) error

func (*Explorer) Content

func (ex *Explorer) Content(c echo.Context) error

func (*Explorer) Dashboard

func (ex *Explorer) Dashboard(c echo.Context) error

func (*Explorer) DebugPlay

func (ex *Explorer) DebugPlay(c echo.Context) error

DebugPlay injects a fake play event into the ETL pubsub for testing. Usage: curl -X POST 'https://node1.oap.devnet/api/debug/play?city=Tokyo&region=Kanto&country=Japan'

func (*Explorer) Hello

func (ex *Explorer) Hello(c echo.Context) error

func (*Explorer) Initialize

func (ex *Explorer) Initialize()

func (*Explorer) LiveEventsSSE

func (ex *Explorer) LiveEventsSSE(c echo.Context) error

func (*Explorer) NetworkSidebarFragment

func (ex *Explorer) NetworkSidebarFragment(c echo.Context) error

func (*Explorer) Rollups

func (ex *Explorer) Rollups(c echo.Context) error

func (*Explorer) Run

func (ex *Explorer) Run() error

func (*Explorer) Search

func (ex *Explorer) Search(c echo.Context) error

func (*Explorer) StatsHeaderFragment

func (ex *Explorer) StatsHeaderFragment(c echo.Context) error

HTMX Fragment Handlers

func (*Explorer) Stop

func (ex *Explorer) Stop()

func (*Explorer) TPSFragment

func (ex *Explorer) TPSFragment(c echo.Context) error

func (*Explorer) TotalTransactionsFragment

func (ex *Explorer) TotalTransactionsFragment(c echo.Context) error

func (*Explorer) Transaction

func (ex *Explorer) Transaction(c echo.Context) error

func (*Explorer) Transactions

func (ex *Explorer) Transactions(c echo.Context) error

func (*Explorer) Validator

func (ex *Explorer) Validator(c echo.Context) error

func (*Explorer) ValidatorLocations

func (ex *Explorer) ValidatorLocations(c echo.Context) error

ValidatorLocations returns cached validator geographic positions

func (*Explorer) Validators

func (ex *Explorer) Validators(c echo.Context) error

func (*Explorer) ValidatorsUptime

func (ex *Explorer) ValidatorsUptime(c echo.Context) error

func (*Explorer) ValidatorsUptimeByRollup

func (ex *Explorer) ValidatorsUptimeByRollup(c echo.Context) error

type SSEEvent

type SSEEvent struct {
	Event string `json:"event"`
	Data  any    `json:"data"`
}

type ValidatorLocation

type ValidatorLocation struct {
	Address  string  `json:"address"`
	Endpoint string  `json:"endpoint"`
	Lat      float64 `json:"lat"`
	Lng      float64 `json:"lng"`
}

ValidatorLocation represents a validator node's geographic position

Directories

Path Synopsis
templ: version: v0.3.898
templ: version: v0.3.898
layouts
templ: version: v0.3.898
templ: version: v0.3.898
pages
templ: version: v0.3.898
templ: version: v0.3.898

Jump to

Keyboard shortcuts

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