environment

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Local          = "local"
	StagingTestnet = "staging_testnet"
	StagingMainnet = "staging_mainnet"
	Staging        = "staging" // Note this is currently the equivalent of staging_testnet.
	ProdMainnet    = "prod_mainnet"
	ProdTestnet    = "prod_testnet"
	Prod           = "prod"

	// Legacy environments to be cleaned up once the migration to the above environments is completed.
	Testnet    = "testnet"
	Mainnet    = "mainnet"
	SolStaging = "solana-staging" // Note this is testnet staging for Solana.
)

Variables

This section is empty.

Functions

func LoadEnvConfig added in v0.38.0

func LoadEnvConfig(dom domain.Domain, env string) (*config_env.Config, error)

LoadEnvConfig retrieves the environment configuration for a given domain and environment.

Loading strategy:

  • In CI environments: Loads configuration exclusively from environment variables set by the CI pipeline.
  • In local development: Loads configuration from a local config file specific to the domain and environment.

func LoadNetworks added in v0.38.0

func LoadNetworks(
	env string, dom domain.Domain, lggr logger.Logger,
) (*config_network.Config, error)

LoadNetworks retrieves the network configuration for the given domain and filters the networks according to the specified environment. This ensures that only networks relevant to the selected environment are accessible, minimizing the risk of accidental operations on unintended networks.

Types

type Config

type Config struct {
	Networks *config_network.Config // The network config loaded from the network manifest file
	Env      *config_env.Config     // The cld engine's environment config
}

Config consolidates all the config that is required to be loaded for a domain environment.

Specifically it contains the network config and secrets which is loaded from files or env vars.

func LoadConfig added in v0.38.0

func LoadConfig(dom domain.Domain, env string, lggr logger.Logger) (*Config, error)

LoadConfig loads and consolidates all configuration required for a domain environment, including network configuration and environment-specific settings.n.

Jump to

Keyboard shortcuts

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