attemptexec

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProviderExecutorAvailable

func ProviderExecutorAvailable(provider ProviderAttemptExecutor) bool

ProviderExecutorAvailable reports whether provider can execute without a nil receiver or a missing built-in dispatcher dependency.

Types

type DispatchResult added in v0.0.15

type DispatchResult struct {
	Outcome            state.AttemptResult
	ProviderDispatched bool
}

type Executor

type Executor struct {
	Dispatcher state.Dispatcher
	Gate       state.RateGate
	Resilience ResilientRunner
}

func (*Executor) Execute

func (e *Executor) Execute(rctx *state.RelayContext, attempt state.Attempt) ProviderResult

type ProviderAttemptExecutor

type ProviderAttemptExecutor interface {
	Execute(*state.RelayContext, state.Attempt) ProviderResult
}

func NewProviderExecutor

func NewProviderExecutor(
	dispatcher state.Dispatcher,
	resilientRunner ResilientRunner,
	gate state.RateGate,
) ProviderAttemptExecutor

type ProviderResult

type ProviderResult struct {
	Outcome            state.AttemptResult
	Dispatches         int
	ProviderDispatched bool
}

type ResilientRunner

type ResilientRunner interface {
	Run(*state.RelayContext, state.Attempt, func() DispatchResult) state.AttemptResult
}

Jump to

Keyboard shortcuts

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