Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithUseFallback ¶
WithUseFallback sets those errors that should trigger a fallback.
Types ¶
type Fallback ¶
type Fallback struct {
// contains filtered or unexported fields
}
func New ¶
func New(call FallbackFn, opts ...option) *Fallback
New creates a new Fallback with the supplied options.
func (*Fallback) Call ¶
Call will execute the fallback function. Callers should check UseFallback prior to calling.
func (*Fallback) UseFallback ¶
UseFallback will indicate if the fallback should be called.
type FallbackFn ¶
type FallbackFn func() error
Click to show internal directories.
Click to hide internal directories.