Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
gouthamp-stellar committed Oct 9, 2024
1 parent d0fa39d commit 44cb3ec
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 173 deletions.
166 changes: 0 additions & 166 deletions cmd/utils/global_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,172 +142,6 @@ func DistributionAccountSignatureClientProviderOption(configKey *signing.Signatu
}
}

func RPCURLOption(configKey *string) *config.ConfigOption {
return &config.ConfigOption{
Name: "rpc-url",
Usage: "The URL of the RPC Server.",
OptType: types.String,
ConfigKey: configKey,
FlagDefault: "localhost:8080",
Required: true,
}
}

func RPCCallerServiceChannelBufferSizeOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 1000,
}
}

func RPCCallerServiceMaxWorkersOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 100,
}

}

func ErrorHandlerServiceJitterChannelBufferSizeOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 100,
Required: true,
}
}

func ErrorHandlerServiceJitterChannelMaxWorkersOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func ErrorHandlerServiceNonJitterChannelBufferSizeOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 100,
Required: true,
}

}

func ErrorHandlerServiceNonJitterChannelMaxWorkersOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func ErrorHandlerServiceJitterChannelMinWaitBtwnRetriesMSOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func ErrorHandlerServiceNonJitterChannelWaitBtwnRetriesMSOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func ErrorHandlerServiceJitterChannelMaxRetriesOptions(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}

}

func ErrorHandlerServiceNonJitterChannelMaxRetriesOption(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func WebhookHandlerServiceChannelMaxBufferSizeOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-max-buffer-size",
Usage: "Set the buffer size of the webhook serive channel.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 100,
Required: true,
}
}

func WebhookHandlerServiceChannelMaxWorkersOptions(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func WebhookHandlerServiceChannelMaxRetriesOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-max-retries",
Usage: "Set the max number of times to ping a webhook before quitting.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 3,
Required: true,
}
}

func WebhookHandlerServiceChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-min-wait-between-retries",
Usage: "The minumum amout of time to wait before repining the webhook url",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func AWSOptions(awsRegionConfigKey *string, kmsKeyARN *string, required bool) config.ConfigOptions {
awsOpts := config.ConfigOptions{
{
Expand Down
44 changes: 44 additions & 0 deletions cmd/utils/tss_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,47 @@ func ErrorHandlerServiceNonJitterChannelMaxRetriesOption(configKey *int) *config
Required: true,
}
}

func WebhookHandlerServiceChannelMaxBufferSizeOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-max-buffer-size",
Usage: "Set the buffer size of the webhook serive channel.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 100,
Required: true,
}
}

func WebhookHandlerServiceChannelMaxWorkersOptions(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.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}

func WebhookHandlerServiceChannelMaxRetriesOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-max-retries",
Usage: "Set the max number of times to ping a webhook before quitting.",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 3,
Required: true,
}
}

func WebhookHandlerServiceChannelMinWaitBtwnRetriesMSOption(configKey *int) *config.ConfigOption {
return &config.ConfigOption{
Name: "webhook-service-channel-min-wait-between-retries",
Usage: "The minumum amout of time to wait before repining the webhook url",
OptType: types.Int,
ConfigKey: configKey,
FlagDefault: 10,
Required: true,
}
}
7 changes: 0 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,3 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

0 comments on commit 44cb3ec

Please sign in to comment.