Documentation ¶
Index ¶
- func CalculatorModuleFactory(ctx context.Context, config cfg.Config, logger log.Logger) (map[string]kernel.ModuleFactory, error)
- func NewCalculatorModule(handlers map[string]Handler, settings *CalculatorSettings) kernel.ModuleFactory
- func NewPerRunnerMetricHandlerWithInterfaces(logger log.Logger, clock clock.Clock, cwClient gosoCloudwatch.Client, ...) *perRunnerMetricHandler
- func ReadHandlerSettings[T any](config cfg.Config, name string, settings T) T
- func RegisterHandlerFactory(name string, factory HandlerFactory)
- type CalculatorModule
- type CalculatorSettings
- type CloudWatchNamingSettings
- type CloudWatchSettings
- type DynamoDbNamingSettings
- type DynamoDbSettings
- type EcsSettings
- type Handler
- type HandlerFactory
- type PerRunnerMetricHandler
- type PerRunnerMetricSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatorModuleFactory ¶
func NewCalculatorModule ¶
func NewCalculatorModule(handlers map[string]Handler, settings *CalculatorSettings) kernel.ModuleFactory
func NewPerRunnerMetricHandlerWithInterfaces ¶
func NewPerRunnerMetricHandlerWithInterfaces(logger log.Logger, clock clock.Clock, cwClient gosoCloudwatch.Client, calculatorSettings *CalculatorSettings) *perRunnerMetricHandler
func ReadHandlerSettings ¶
func RegisterHandlerFactory ¶
func RegisterHandlerFactory(name string, factory HandlerFactory)
Types ¶
type CalculatorModule ¶
type CalculatorModule struct { kernel.EssentialModule kernel.ServiceStage // contains filtered or unexported fields }
func NewCalculatorModuleWithInterfaces ¶
func NewCalculatorModuleWithInterfaces( logger log.Logger, leaderElection ddb.LeaderElection, cwClient gosoCloudwatch.Client, metricWriter metric.Writer, ticker clock.Ticker, handlers map[string]Handler, memberId string, settings *CalculatorSettings, ) *CalculatorModule
type CalculatorSettings ¶
type CalculatorSettings struct { Cloudwatch CloudWatchSettings `cfg:"cloudwatch"` DynamoDb DynamoDbSettings `cfg:"dynamodb"` Enabled bool `cfg:"enabled" default:"false"` Ecs EcsSettings `cfg:"ecs"` LeaderElection string `cfg:"leader_election" default:"metric_calculator"` Period time.Duration `cfg:"period" default:"1m"` CloudWatchNamespace string }
type CloudWatchNamingSettings ¶
type CloudWatchNamingSettings struct {
Pattern string `cfg:"pattern,nodecode" default:"{project}/{env}/{family}/{group}-{app}"`
}
type CloudWatchSettings ¶
type CloudWatchSettings struct {
Client string `cfg:"client"`
}
type DynamoDbNamingSettings ¶
type DynamoDbNamingSettings struct {
Pattern string `cfg:"pattern,nodecode" default:"{project}-{env}-{family}-{modelId}"`
}
type DynamoDbSettings ¶
type DynamoDbSettings struct {
Naming DynamoDbNamingSettings `cfg:"naming"`
}
type EcsSettings ¶
type HandlerFactory ¶
type PerRunnerMetricHandler ¶
type PerRunnerMetricSettings ¶
type PerRunnerMetricSettings struct { Enabled bool `cfg:"enabled" default:"true"` MaxIncreasePercent float64 `cfg:"max_increase_percent" default:"200"` MaxIncreasePeriod time.Duration `cfg:"max_increase_period" default:"5m"` Period time.Duration `cfg:"period" default:"1m"` TargetValue float64 `cfg:"target_value" default:"0"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.