Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrChainIDEmpty is returned when chain is required but was empty. ErrChainIDEmpty = errors.New("chain id empty") ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type ChainConfig ¶
type ChainConfigs ¶
type ChainConfigs[I ID] interface { Chains(offset, limit int, ids ...I) ([]ChainConfig, int, error) }
type ChainService ¶
type ChainService interface { services.ServiceCtx }
ChainService is a live, runtime chain instance, with supporting services.
type ChainSet ¶
type ChainSet[I ID, N Node, S ChainService] interface { services.ServiceCtx Chains[I] Nodes[I, N] Name() string HealthReport() map[string]error // Chain returns the ChainService for this ID (if a configuration is available), creating one if necessary. Chain(context.Context, I) (S, error) }
ChainSet manages a live set of ChainService instances.
func NewChainSet ¶
func NewChainSet[I ID, N Node, S ChainService](chains map[string]S, opts ChainSetOpts[I, N], formatID func(I) string, ) (ChainSet[I, N, S], error)
NewChainSet returns a new immutable ChainSet for the given ChainSetOpts.
type ChainSetOpts ¶
type ChainSetOpts[I ID, N Node] interface { Validate() error ConfigsAndLogger() (Configs[I, N], logger.Logger) }
ChainSetOpts holds options for configuring a ChainSet via NewChainSet.
type Chains ¶
type Chains[I ID] interface { Show(id I) (ChainConfig, error) Index(offset, limit int) ([]ChainConfig, int, error) }
Chains is a generic interface for ChainConfig[I, C] configuration.
type Configs ¶
type Configs[I ID, N Node] interface { ChainConfigs[I] NodeConfigs[I, N] }
Configs holds chain and node configurations.
type ID ¶
type ID any
ID types represent unique identifiers within a particular chain type. Using string is recommended.
type Node ¶
type Node any
Node types should be a struct including these default fields:
ID int32 Name string
type NodeConfigs ¶
Directories ¶
Path | Synopsis |
---|---|
gas/cmd/arbgas
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator.
|
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator. |
logpoller
Package logpoller is a service for querying EVM log data.
|
Package logpoller is a service for querying EVM log data. |
Click to show internal directories.
Click to hide internal directories.