resilience

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: ../pkg/resilience/types.go

Generated by this command:

mockgen -source ../pkg/resilience/types.go -destination ../pkg/resilience/mocks.go -package=resilience

Package resilience is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(failsafe FailSaver, target func() error) error

Types

type DefaultFailSaver

type DefaultFailSaver struct {
	// contains filtered or unexported fields
}

func NewDefaultFailSaver

func NewDefaultFailSaver(opts ...DefaultFailSaverOption) *DefaultFailSaver

func (*DefaultFailSaver) Run

func (failSafe *DefaultFailSaver) Run(target func() error) error

type DefaultFailSaverOption

type DefaultFailSaverOption func(*DefaultFailSaver)

func WithCircuitBreaker

func WithCircuitBreaker(breaker FailSaver) DefaultFailSaverOption

func WithRetrier

func WithRetrier(retrier FailSaver) DefaultFailSaverOption

type FailSaver

type FailSaver interface {
	Run(work func() error) error
}

type MockFailSaver

type MockFailSaver struct {
	// contains filtered or unexported fields
}

MockFailSaver is a mock of FailSaver interface.

func NewMockFailSaver

func NewMockFailSaver(ctrl *gomock.Controller) *MockFailSaver

NewMockFailSaver creates a new mock instance.

func (*MockFailSaver) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFailSaver) Run

func (m *MockFailSaver) Run(work func() error) error

Run mocks base method.

type MockFailSaverMockRecorder

type MockFailSaverMockRecorder struct {
	// contains filtered or unexported fields
}

MockFailSaverMockRecorder is the mock recorder for MockFailSaver.

func (*MockFailSaverMockRecorder) Run

func (mr *MockFailSaverMockRecorder) Run(work any) *gomock.Call

Run indicates an expected call of Run.

type NoFailSaver

type NoFailSaver struct {
}

func NewNoFailSaver

func NewNoFailSaver() *NoFailSaver

func (*NoFailSaver) Run

func (failSafe *NoFailSaver) Run(target func() error) error

Jump to

Keyboard shortcuts

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