Documentation ¶
Index ¶
- func NewTaskHandler(telCtx domain.TelemetryContext, spec *model.TaskSpec, ...) domain.TaskHandler
- func WithCircuitBreaker(spec model.CircuitBreakerSpec, secondaryAdapter secondary.SecodaryPort, ...) (CallWithContextAlias, CircuitBreaker)
- type CallAlias
- type CallWithContextAlias
- func WithAdaptiveRTOCallTimeout(spec model.AdaptiveTimeoutSpec, secondaryAdapter secondary.SecodaryPort, ...) CallWithContextAlias
- func WithCallDurationMetrics(next CallWithContextAlias, async bool) CallWithContextAlias
- func WithCallTimeout(timeout time.Duration, next CallWithContextAlias) CallWithContextAlias
- func WithCriticalError(isCritical bool, next CallWithContextAlias) CallWithContextAlias
- func WithLogger(telCtx domain.TelemetryContext, timing string, ...) CallWithContextAlias
- func WithRetry(spec model.RetrySpec, next CallWithContextAlias) CallWithContextAlias
- func WithTaskDurationMetrics(next CallWithContextAlias, async bool) CallWithContextAlias
- func WithTaskTimeout(timeout time.Duration, next CallWithContextAlias) CallWithContextAlias
- func WithUnWrapTaskContext(next CallAlias) CallWithContextAlias
- type CircuitBreaker
- type TaskContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTaskHandler ¶
func NewTaskHandler(telCtx domain.TelemetryContext, spec *model.TaskSpec, adapter secondary.SecodaryPort) domain.TaskHandler
func WithCircuitBreaker ¶
func WithCircuitBreaker(spec model.CircuitBreakerSpec, secondaryAdapter secondary.SecodaryPort, next CallWithContextAlias) (CallWithContextAlias, CircuitBreaker)
Types ¶
type CallWithContextAlias ¶
type CallWithContextAlias = func(context.Context, *TaskContext) secondary.SecondaryPortCallResult
func WithAdaptiveRTOCallTimeout ¶ added in v1.0.23
func WithAdaptiveRTOCallTimeout(spec model.AdaptiveTimeoutSpec, secondaryAdapter secondary.SecodaryPort, telCtx domain.TelemetryContext, next CallWithContextAlias) CallWithContextAlias
func WithCallDurationMetrics ¶
func WithCallDurationMetrics(next CallWithContextAlias, async bool) CallWithContextAlias
func WithCallTimeout ¶
func WithCallTimeout(timeout time.Duration, next CallWithContextAlias) CallWithContextAlias
func WithCriticalError ¶
func WithCriticalError(isCritical bool, next CallWithContextAlias) CallWithContextAlias
func WithLogger ¶
func WithLogger(telCtx domain.TelemetryContext, timing string, secondaryAdapter secondary.SecodaryPort, next CallWithContextAlias) CallWithContextAlias
func WithRetry ¶
func WithRetry(spec model.RetrySpec, next CallWithContextAlias) CallWithContextAlias
func WithTaskDurationMetrics ¶
func WithTaskDurationMetrics(next CallWithContextAlias, async bool) CallWithContextAlias
func WithTaskTimeout ¶
func WithTaskTimeout(timeout time.Duration, next CallWithContextAlias) CallWithContextAlias
func WithUnWrapTaskContext ¶
func WithUnWrapTaskContext(next CallAlias) CallWithContextAlias
WithUnWrapTaskContext decorates `next` function with a decorator that unwraps TaskContext into context.Context Should be the first decorator
type CircuitBreaker ¶
type CircuitBreaker = *gobreaker.CircuitBreaker[secondary.SecondaryPortCallResult]
type TaskContext ¶
type TaskContext struct {
// contains filtered or unexported fields
}
func (*TaskContext) IncAttempt ¶
func (tc *TaskContext) IncAttempt()
Click to show internal directories.
Click to hide internal directories.