Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Online is when the implementation is permitted // to make outbound connections. Online Mode = "ONLINE" // Offline is when the implementation is not permitted // to make outbound connections. Offline Mode = "OFFLINE" // Mainnet is the Klaytn Mainnet. Mainnet string = "MAINNET" // Testnet is the Klaytn Baobab testnet. Testnet string = "TESTNET" // Local is a local private network for testing purpose. Local string = "LOCAL" // DataDirectory is the default location for all // persistent data. DataDirectory = "/data" // ModeEnv is the environment variable read // to determine mode. ModeEnv = "MODE" // NetworkEnv is the environment variable // read to determine network. NetworkEnv = "NETWORK" // PortEnv is the environment variable // read to determine the port for the Rosetta // implementation. PortEnv = "PORT" // KENEnv is an optional environment variable // used to connect rosetta-klaytn to an already // running klaytn client node. KENEnv = "KEN" // DefaultKENURL is the default URL for // a running ken node. This is used // when KENEnv is not populated. DefaultKENURL = "http://localhost:8551" // SkipAdminEnv is an optional environment variable // to skip `admin` calls which are typically not supported // by hosted node services. When not set, defaults to false. SkipAdminEnv = "SKIP_ADMIN" // MiddlewareVersion is the version of rosetta-klaytn. MiddlewareVersion = "1.0.7" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Mode Mode Network *types.NetworkIdentifier GenesisBlockIdentifier *types.BlockIdentifier KlaytnNodeURL string RemoteNode bool Port int KlaytnNodeArguments string SkipAdmin bool // Block Reward Data Params *params.ChainConfig }
Configuration determines how
func LoadConfiguration ¶
func LoadConfiguration() (*Configuration, error)
LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.
Click to show internal directories.
Click to hide internal directories.