diff --git a/cmd/serve.go b/cmd/serve.go index 320e798..2108e26 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -30,23 +30,23 @@ func (c *serveCmd) Command() *cobra.Command { utils.BaseFeeOption(&cfg.BaseFee), utils.HorizonClientURLOption(&cfg.HorizonClientURL), utils.RPCURLOption(&cfg.RPCURL), - utils.RPCCallerServiceChannelBufferSizeOption(&cfg.RPCCallerServiceChannelBufferSize), - utils.RPCCallerServiceMaxWorkersOption(&cfg.RPCCallerServiceChannelMaxWorkers), + utils.RPCCallerChannelBufferSizeOption(&cfg.RPCCallerServiceChannelBufferSize), + utils.RPCCallerChannelMaxWorkersOption(&cfg.RPCCallerServiceChannelMaxWorkers), utils.ChannelAccountEncryptionPassphraseOption(&cfg.EncryptionPassphrase), utils.SentryDSNOption(&sentryDSN), utils.StellarEnvironmentOption(&stellarEnvironment), - utils.ErrorHandlerServiceJitterChannelBufferSizeOption(&cfg.ErrorHandlerServiceJitterChannelBufferSize), - utils.ErrorHandlerServiceJitterChannelMaxWorkersOption(&cfg.ErrorHandlerServiceJitterChannelMaxWorkers), - utils.ErrorHandlerServiceNonJitterChannelBufferSizeOption(&cfg.ErrorHandlerServiceNonJitterChannelBufferSize), - utils.ErrorHandlerServiceNonJitterChannelMaxWorkersOption(&cfg.ErrorHandlerServiceNonJitterChannelMaxWorkers), - utils.ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMSOption(&cfg.ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMS), - utils.ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMSOption(&cfg.ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMS), - utils.ErrorHandlerServiceJitterChannelMaxRetriesOptions(&cfg.ErrorHandlerServiceJitterChannelMaxRetries), - utils.ErrorHandlerServiceNonJitterChannelMaxRetriesOption(&cfg.ErrorHandlerServiceNonJitterChannelMaxRetries), - utils.WebhookHandlerServiceChannelMaxBufferSizeOption(&cfg.WebhookHandlerServiceChannelMaxBufferSize), - utils.WebhookHandlerServiceChannelMaxWorkersOptions(&cfg.WebhookHandlerServiceChannelMaxWorkers), - utils.WebhookHandlerServiceChannelMaxRetriesOption(&cfg.WebhookHandlerServiceChannelMaxRetries), - utils.WebhookHandlerServiceChannelMinWaitBtwnRetriesMSOption(&cfg.WebhookHandlerServiceChannelMinWaitBtwnRetriesMS), + utils.ErrorHandlerJitterChannelBufferSizeOption(&cfg.ErrorHandlerServiceJitterChannelBufferSize), + utils.ErrorHandlerJitterChannelMaxWorkersOption(&cfg.ErrorHandlerServiceJitterChannelMaxWorkers), + utils.ErrorHandlerNonJitterChannelBufferSizeOption(&cfg.ErrorHandlerServiceNonJitterChannelBufferSize), + utils.ErrorHandlerNonJitterChannelMaxWorkersOption(&cfg.ErrorHandlerServiceNonJitterChannelMaxWorkers), + utils.ErrorHandlerJitterChannelMinWaitBtwnRetriesMSOption(&cfg.ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMS), + utils.ErrorHandlerNonJitterChannelWaitBtwnRetriesMSOption(&cfg.ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMS), + utils.ErrorHandlerJitterChannelMaxRetriesOptions(&cfg.ErrorHandlerServiceJitterChannelMaxRetries), + utils.ErrorHandlerNonJitterChannelMaxRetriesOption(&cfg.ErrorHandlerServiceNonJitterChannelMaxRetries), + utils.WebhookHandlerChannelMaxBufferSizeOption(&cfg.WebhookHandlerServiceChannelMaxBufferSize), + utils.WebhookHandlerChannelMaxWorkersOptions(&cfg.WebhookHandlerServiceChannelMaxWorkers), + utils.WebhookHandlerChannelMaxRetriesOption(&cfg.WebhookHandlerServiceChannelMaxRetries), + utils.WebhookHandlerChannelMinWaitBtwnRetriesMSOption(&cfg.WebhookHandlerServiceChannelMinWaitBtwnRetriesMS), { Name: "port", diff --git a/cmd/utils/tss_options.go b/cmd/utils/tss_options.go index 7a3e9b0..6cb729b 100644 --- a/cmd/utils/tss_options.go +++ b/cmd/utils/tss_options.go @@ -6,20 +6,20 @@ import ( "github.com/stellar/go/support/config" ) -func RPCCallerServiceChannelBufferSizeOption(configKey *int) *config.ConfigOption { +func RPCCallerChannelBufferSizeOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "tss-rpc-caller-service-channel-buffer-size", - Usage: "Set the buffer size for TSS RPC Caller Service channel.", + Name: "tss-rpc-caller-channel-buffer-size", + Usage: "Set the buffer size for TSS RPC Caller channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 1000, } } -func RPCCallerServiceMaxWorkersOption(configKey *int) *config.ConfigOption { +func RPCCallerChannelMaxWorkersOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "tss-rpc-caller-service-channel-max-workers", - Usage: "Set the maximum number of workers for TSS RPC Caller Service channel.", + Name: "tss-rpc-caller-channel-max-workers", + Usage: "Set the maximum number of workers for TSS RPC Caller channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 100, @@ -27,10 +27,10 @@ func RPCCallerServiceMaxWorkersOption(configKey *int) *config.ConfigOption { } -func ErrorHandlerServiceJitterChannelBufferSizeOption(configKey *int) *config.ConfigOption { +func ErrorHandlerJitterChannelBufferSizeOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-jitter-channel-buffer-size", - Usage: "Set the buffer size of the Error Handler Service Jitter channel.", + Name: "error-handler-jitter-channel-buffer-size", + Usage: "Set the buffer size of the Error Handler Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 100, @@ -38,10 +38,10 @@ func ErrorHandlerServiceJitterChannelBufferSizeOption(configKey *int) *config.Co } } -func ErrorHandlerServiceJitterChannelMaxWorkersOption(configKey *int) *config.ConfigOption { +func ErrorHandlerJitterChannelMaxWorkersOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-jitter-channel-max-workers", - Usage: "Set the maximum number of workers for the Error Handler Service Jitter channel.", + Name: "error-handler-jitter-channel-max-workers", + Usage: "Set the maximum number of workers for the Error Handler Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -49,10 +49,10 @@ func ErrorHandlerServiceJitterChannelMaxWorkersOption(configKey *int) *config.Co } } -func ErrorHandlerServiceNonJitterChannelBufferSizeOption(configKey *int) *config.ConfigOption { +func ErrorHandlerNonJitterChannelBufferSizeOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-non-jitter-channel-buffer-size", - Usage: "Set the buffer size of the Error Handler Service Non Jitter channel.", + Name: "error-handler-non-jitter-channel-buffer-size", + Usage: "Set the buffer size of the Error Handler Non Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 100, @@ -61,10 +61,10 @@ func ErrorHandlerServiceNonJitterChannelBufferSizeOption(configKey *int) *config } -func ErrorHandlerServiceNonJitterChannelMaxWorkersOption(configKey *int) *config.ConfigOption { +func ErrorHandlerNonJitterChannelMaxWorkersOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-non-jitter-channel-max-workers", - Usage: "Set the maximum number of workers for the Error Handler Service Non Jitter channel.", + Name: "error-handler-non-jitter-channel-max-workers", + Usage: "Set the maximum number of workers for the Error Handler Non Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -72,10 +72,10 @@ func ErrorHandlerServiceNonJitterChannelMaxWorkersOption(configKey *int) *config } } -func ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { +func ErrorHandlerJitterChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-jitter-channel-min-wait-between-retries", - Usage: "Set the minimum amount of time in ms between retries for the Error Handler Service Jitter channel.", + Name: "error-handler-jitter-channel-min-wait-between-retries", + Usage: "Set the minimum amount of time in ms between retries for the Error Handler Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -83,10 +83,10 @@ func ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMSOption(configKey *int) } } -func ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { +func ErrorHandlerNonJitterChannelWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-non-jitter-channel-wait-between-retries", - Usage: "Set the amount of time in ms between retries for the Error Handler Service Non Jitter channel.", + Name: "error-handler-non-jitter-channel-wait-between-retries", + Usage: "Set the amount of time in ms between retries for the Error Handler Non Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -94,10 +94,10 @@ func ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMSOption(configKey *int) } } -func ErrorHandlerServiceJitterChannelMaxRetriesOptions(configKey *int) *config.ConfigOption { +func ErrorHandlerJitterChannelMaxRetriesOptions(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-jitter-channel-max-retries", - Usage: "Set the number of retries for each task in the Error Handler Service Jitter channel.", + Name: "error-handler-jitter-channel-max-retries", + Usage: "Set the number of retries for each task in the Error Handler Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -106,10 +106,10 @@ func ErrorHandlerServiceJitterChannelMaxRetriesOptions(configKey *int) *config.C } -func ErrorHandlerServiceNonJitterChannelMaxRetriesOption(configKey *int) *config.ConfigOption { +func ErrorHandlerNonJitterChannelMaxRetriesOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "error-handler-service-non-jitter-channel-max-retries", - Usage: "Set the number of retries for each task in the Error Handler Service Non Jitter channel.", + Name: "error-handler-non-jitter-channel-max-retries", + Usage: "Set the number of retries for each task in the Error Handler Service Jitter channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -117,10 +117,10 @@ func ErrorHandlerServiceNonJitterChannelMaxRetriesOption(configKey *int) *config } } -func WebhookHandlerServiceChannelMaxBufferSizeOption(configKey *int) *config.ConfigOption { +func WebhookHandlerChannelMaxBufferSizeOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "webhook-service-channel-max-buffer-size", - Usage: "Set the buffer size of the webhook serive channel.", + Name: "webhook-channel-max-buffer-size", + Usage: "Set the buffer size of the webhook channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 100, @@ -128,10 +128,10 @@ func WebhookHandlerServiceChannelMaxBufferSizeOption(configKey *int) *config.Con } } -func WebhookHandlerServiceChannelMaxWorkersOptions(configKey *int) *config.ConfigOption { +func WebhookHandlerChannelMaxWorkersOptions(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "webhook-service-channel-max-workers", - Usage: "Set the max number of workers for the webhook serive channel.", + Name: "webhook-channel-max-workers", + Usage: "Set the max number of workers for the webhook channel.", OptType: types.Int, ConfigKey: configKey, FlagDefault: 10, @@ -139,9 +139,9 @@ func WebhookHandlerServiceChannelMaxWorkersOptions(configKey *int) *config.Confi } } -func WebhookHandlerServiceChannelMaxRetriesOption(configKey *int) *config.ConfigOption { +func WebhookHandlerChannelMaxRetriesOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "webhook-service-channel-max-retries", + Name: "webhook-channel-max-retries", Usage: "Set the max number of times to ping a webhook before quitting.", OptType: types.Int, ConfigKey: configKey, @@ -150,9 +150,9 @@ func WebhookHandlerServiceChannelMaxRetriesOption(configKey *int) *config.Config } } -func WebhookHandlerServiceChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { +func WebhookHandlerChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption { return &config.ConfigOption{ - Name: "webhook-service-channel-min-wait-between-retries", + Name: "webhook-channel-min-wait-between-retries", Usage: "The minumum amout of time to wait before resending the payload to the webhook url", OptType: types.Int, ConfigKey: configKey,