resilience

package
v0.71.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package resilience exposes the Kernel resilience policies to Flow atoms.

Index

Constants

View Source
const ID = "resilience"

Variables

This section is empty.

Functions

func Bundle

func Bundle(options map[string]string) compiler.Bundle

Bundle builds an instance-owned resilience bundle from @require options. Its registry is local to this bundle instance and shared by all compiled actions using that instance; it is neither global nor distributed.

func BundleWithConfig

func BundleWithConfig(cfg Config) compiler.Bundle

BundleWithConfig creates a resilience bundle using the supplied host config. If Config.Registry is nil, a private registry is allocated for this bundle.

func BundleWithRegistry

func BundleWithRegistry(cfg Config, registry *action.CircuitBreakerRegistry) compiler.Bundle

BundleWithRegistry lets a host explicitly share breaker state across bundle instances or separately compiled programs. The registry remains process-local.

func Modifiers

func Modifiers() []compiler.Modifier

Modifiers exposes only the standalone breaker selector. Existing retry, timeout, and concurrency modifiers remain Kernel-owned and are consumed by the single resilience adviser when this bundle is loaded.

Types

type Config

type Config struct {
	Retry          retry.Config
	CircuitBreaker action.CircuitBreakerConfig
	Registry       *action.CircuitBreakerRegistry
}

Config is the Go host configuration for the resilience bundle. Retry uses retry.Config so legacy defaults and validation remain the single source of truth. Registry is host-only and intentionally has no nflow tag.

func ConfigFromOptions

func ConfigFromOptions(options map[string]string) (Config, error)

ConfigFromOptions strictly decodes options accepted by @require resilience. Retry defaults and policy validation are delegated to extensions/retry.

Jump to

Keyboard shortcuts

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