cartographoor

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultCartographoorURL is the default URL for fetching network data.
	DefaultCartographoorURL = "https://ethpandaops-platform-production-cartographoor.ams3.digitaloceanspaces.com/networks.json"

	// DefaultCacheTTL is the default cache duration.
	DefaultCacheTTL = 5 * time.Minute

	// DefaultHTTPTimeout is the default HTTP request timeout.
	DefaultHTTPTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CartographoorClient

type CartographoorClient interface {
	// Start initializes the client and fetches initial data.
	Start(ctx context.Context) error
	// Stop stops background refresh.
	Stop() error
	// GetAllNetworks returns all networks.
	GetAllNetworks() map[string]discovery.Network
	// GetActiveNetworks returns only active networks.
	GetActiveNetworks() map[string]discovery.Network
	// GetNetwork returns a single network by name.
	GetNetwork(name string) (discovery.Network, bool)
	// GetGroup returns all networks in a devnet group.
	GetGroup(name string) (map[string]discovery.Network, bool)
	// GetGroups returns all available devnet group names.
	GetGroups() []string
	// GetActiveGroups returns active network ids grouped by devnet family.
	GetActiveGroups() map[string][]string
}

CartographoorClient fetches and caches network data from cartographoor.

func NewCartographoorClient

func NewCartographoorClient(log logrus.FieldLogger, cfg CartographoorConfig) CartographoorClient

NewCartographoorClient creates a new cartographoor client.

type CartographoorConfig

type CartographoorConfig struct {
	URL      string
	CacheTTL time.Duration
	Timeout  time.Duration
}

CartographoorConfig holds configuration for the cartographoor client.

Jump to

Keyboard shortcuts

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