recourse

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package recourse is the facade package that re-exports key types and provides helpers.

To capture timelines for debugging or observability:

ctx, capture := observe.RecordTimeline(ctx)
result, err := recourse.DoValue(ctx, "svc.Method", op)
tl := capture.Timeline() // Safe to access after call completes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, key string, op retry.Operation) error

Do executes op using the default executor and the policy for key.

func DoValue

func DoValue[T any](ctx context.Context, key string, op retry.OperationValue[T]) (T, error)

DoValue executes op using the default executor and the policy for key.

func Init

func Init(exec *retry.Executor)

Init sets the global default executor. It must be called before Do/DoValue are used.

Types

type Key

type Key = policy.PolicyKey

Key is the structured form of a policy key.

func ParseKey

func ParseKey(s string) Key

ParseKey parses "namespace.name" into a Key.

Jump to

Keyboard shortcuts

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