Skip to content

Commit

Permalink
renaming tss_options
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar committed Oct 23, 2024
1 parent 0019e23 commit 7e8f3ba
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
28 changes: 14 additions & 14 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
80 changes: 40 additions & 40 deletions cmd/utils/tss_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@ 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,
}

}

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,
Required: true,
}
}

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,
Required: true,
}
}

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,
Expand All @@ -61,43 +61,43 @@ 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,
Required: true,
}
}

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,
Required: true,
}
}

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,
Required: true,
}
}

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,
Expand All @@ -106,42 +106,42 @@ 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,
Required: true,
}
}

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,
Required: true,
}
}

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,
Required: true,
}
}

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,
Expand All @@ -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,
Expand Down

0 comments on commit 7e8f3ba

Please sign in to comment.