ops

module
v0.0.0-...-b078d35 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT

README

Ops

Packages for dealing with various operational issues, such as retrying function calls.

Go Reference Go Report Card

Introduction

The packages contained within this repository provide help around execution of operations. Operations here are defined as complex calls that usually involve remote systems.

Complex operations which involve remote systems can fail for different reasons and packages here help with dealing with the nature of those operations.

A quick look

  • retry/ : A set of packages for retrying operations
    • Use retry/exponential if you want:
      • Exponential retry of some operation
      • The ability to customize your own retry policy
      • The ability to visualize your retry policy
      • The ability to transform errors before retrying (like automatic handling of gRPC, HTTP, or SQL errors)
      • The ability to log retry attempts
      • The ability to stop retrying on permanent errors
      • The ability to influence the backoff with a retry timer set to a specific time
  • statemachine/ : A set of packages for creating functional state machines
    • Use statemachine if you want:
      • A simple state machine
      • A state machine with OTEL tracing
      • Low allocations
      • A way to simplify complex sequential processing
      • Easier ways to test than a sequential call chain

Directories

Path Synopsis
retry
exponential
Package exponential provides an exponential backoff mechanism.
Package exponential provides an exponential backoff mechanism.
exponential/helpers/grpc
Package gRPC provides an exponential.ErrTransformer that can be used to detect non-retriable errors for gRPC calls.
Package gRPC provides an exponential.ErrTransformer that can be used to detect non-retriable errors for gRPC calls.
exponential/helpers/http
Package http provides an ErrTransformer for http.Client from the standard library.
Package http provides an ErrTransformer for http.Client from the standard library.
internal/errors
Package errors contains internal types for the retry set of packages.
Package errors contains internal types for the retry set of packages.
Package statemachine provides a simple routing state machine implementation.
Package statemachine provides a simple routing state machine implementation.

Jump to

Keyboard shortcuts

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