resiliency

package
v1.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type CallWithContextAlias

type CallWithContextAlias = func(context.Context, *TaskContext) secondary.SecondaryPortCallResult

func WithAdaptiveCallTimeout added in v1.0.18

func WithAdaptiveCallTimeout(spec model.AdaptiveTimeoutSpec, secondaryAdapter secondary.SecodaryPort, next CallWithContextAlias) CallWithContextAlias

func WithAdaptiveTaskTimeout added in v1.0.18

func WithAdaptiveTaskTimeout(spec model.AdaptiveTimeoutSpec, secondaryAdapter secondary.SecodaryPort, next CallWithContextAlias) CallWithContextAlias

func WithCallDurationMetrics

func WithCallDurationMetrics(next CallWithContextAlias) 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 WithTaskDurationMetrics

func WithTaskDurationMetrics(next CallWithContextAlias) 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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL