The auto-restart Reference Manual

This is the auto-restart Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:19:48 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 auto-restart

automatically generate restart-cases for the most common use cases, and also use the restart for automatic retries

Author

Arnold Noronha <>

License

Apache License, Version 2.0

Version

0.0.1

Dependency

iterate (system).

Source

auto-restart.asd.

Child Component

auto-restart.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 auto-restart/auto-restart.asd

Source

auto-restart.asd.

Parent Component

auto-restart (system).

ASDF Systems

auto-restart.


3.1.2 auto-restart/auto-restart.lisp

Source

auto-restart.asd.

Parent Component

auto-restart (system).

Packages

auto-restart.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 auto-restart

Source

auto-restart.lisp.

Use List
  • common-lisp.
  • iterate.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *global-enable-auto-retries-p*

Globally enable or disable automatic retries. Useful for unit tests.

Package

auto-restart.

Source

auto-restart.lisp.


5.1.2 Macros

Macro: with-auto-restart ((&key retries sleep attempt restart-name auto-restartable-errors) &body body)

Enable auto-restarts for a DEFUN.

ATTEMPT will be a variable name that will be bound to the current attempt. Attempts will be 1-indexed (1, 2, 3 ... ).

AUTO-RESTARTABLE-ERRORS is evaluated to get a list of error classes for which we’re allowed to auto-restart. It defaults to ‘’(ERROR)‘.

Package

auto-restart.

Source

auto-restart.lisp.


5.1.3 Ordinary functions

Function: exponential-backoff (base)
Package

auto-restart.

Source

auto-restart.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *frame*
Package

auto-restart.

Source

auto-restart.lisp.


5.2.2 Ordinary functions

Function: %is-error-of-type (e error-classes)
Package

auto-restart.

Source

auto-restart.lisp.

Function: call-with-auto-restart (restart-name fn)
Package

auto-restart.

Source

auto-restart.lisp.

Function: copy-frame (instance)
Package

auto-restart.

Source

auto-restart.lisp.

Function: fix-args-for-funcall (var-names)
Package

auto-restart.

Source

auto-restart.lisp.

Reader: frame-attempt (instance)
Writer: (setf frame-attempt) (instance)
Package

auto-restart.

Source

auto-restart.lisp.

Target Slot

attempt.

Reader: frame-error-handler (instance)
Writer: (setf frame-error-handler) (instance)
Package

auto-restart.

Source

auto-restart.lisp.

Target Slot

error-handler.

Function: frame-p (object)
Package

auto-restart.

Source

auto-restart.lisp.

Reader: frame-restart-handler (instance)
Writer: (setf frame-restart-handler) (instance)
Package

auto-restart.

Source

auto-restart.lisp.

Target Slot

restart-handler.

Function: make-frame (&key attempt error-handler restart-handler)
Package

auto-restart.

Source

auto-restart.lisp.


5.2.3 Conditions

Condition: restart-already-defined

When calling with-auto-restart, we expect the restart to be defined inside the body, not before it.

Package

auto-restart.

Source

auto-restart.lisp.

Direct superclasses

error.

Direct slots
Slot: restart-name
Package

common-lisp.

Initargs

:restart-name


5.2.4 Structures

Structure: frame
Package

auto-restart.

Source

auto-restart.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: attempt
Readers

frame-attempt.

Writers

(setf frame-attempt).

Slot: error-handler
Readers

frame-error-handler.

Writers

(setf frame-error-handler).

Slot: restart-handler
Readers

frame-restart-handler.

Writers

(setf frame-restart-handler).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   E   F   M   W  
Index Entry  Section

%
%is-error-of-type: Private ordinary functions

(
(setf frame-attempt): Private ordinary functions
(setf frame-error-handler): Private ordinary functions
(setf frame-restart-handler): Private ordinary functions

C
call-with-auto-restart: Private ordinary functions
copy-frame: Private ordinary functions

E
exponential-backoff: Public ordinary functions

F
fix-args-for-funcall: Private ordinary functions
frame-attempt: Private ordinary functions
frame-error-handler: Private ordinary functions
frame-p: Private ordinary functions
frame-restart-handler: Private ordinary functions
Function, %is-error-of-type: Private ordinary functions
Function, (setf frame-attempt): Private ordinary functions
Function, (setf frame-error-handler): Private ordinary functions
Function, (setf frame-restart-handler): Private ordinary functions
Function, call-with-auto-restart: Private ordinary functions
Function, copy-frame: Private ordinary functions
Function, exponential-backoff: Public ordinary functions
Function, fix-args-for-funcall: Private ordinary functions
Function, frame-attempt: Private ordinary functions
Function, frame-error-handler: Private ordinary functions
Function, frame-p: Private ordinary functions
Function, frame-restart-handler: Private ordinary functions
Function, make-frame: Private ordinary functions

M
Macro, with-auto-restart: Public macros
make-frame: Private ordinary functions

W
with-auto-restart: Public macros