From 35437b30d57a96b88f2ce0ddbcde3c3f420c6e36 Mon Sep 17 00:00:00 2001 From: daniel <40469266+daniel-burghardt@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:42:22 -0300 Subject: [PATCH] cmd: rpc url env added to ingest cmd (#48) What Adds a new RPC_URL environment variable to the ingest command. Why It was previously not being read from the envs. --- cmd/ingest.go | 1 + cmd/utils/global_options.go | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/cmd/ingest.go b/cmd/ingest.go index 2e9c60b..23da206 100644 --- a/cmd/ingest.go +++ b/cmd/ingest.go @@ -25,6 +25,7 @@ func (c *ingestCmd) Command() *cobra.Command { utils.NetworkPassphraseOption(&cfg.NetworkPassphrase), utils.SentryDSNOption(&sentryDSN), utils.StellarEnvironmentOption(&stellarEnvironment), + utils.RPCClientURLOption(&cfg.RPCURL), { Name: "captive-core-bin-path", Usage: "Path to Captive Core's binary file.", diff --git a/cmd/utils/global_options.go b/cmd/utils/global_options.go index 7b53a67..b9b081b 100644 --- a/cmd/utils/global_options.go +++ b/cmd/utils/global_options.go @@ -67,6 +67,16 @@ func HorizonClientURLOption(configKey *string) *config.ConfigOption { } } +func RPCClientURLOption(configKey *string) *config.ConfigOption { + return &config.ConfigOption{ + Name: "rpc-url", + Usage: "The URL of the Stellar RPC server which this application will communicate with.", + OptType: types.String, + ConfigKey: configKey, + Required: true, + } +} + func ChannelAccountEncryptionPassphraseOption(configKey *string) *config.ConfigOption { return &config.ConfigOption{ Name: "channel-account-encryption-passphrase",