checker

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConnectionRefused

func IsConnectionRefused(err error) bool

IsConnectionRefused attempts to determine if the given error was caused by a failure to establish a connection.

func NewExpectedError

func NewExpectedError(msg string, cause error, details ...any) error

NewExpectedError creates the ExpectedError

Types

type Checker

type Checker interface {
	Identity() (string, error)
	Check(ctx context.Context) error
}

Checker is the interface that wraps the basic checker methods.

type ExpectedError

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

ExpectedError defines the expectation error

func (*ExpectedError) Details

func (ee *ExpectedError) Details() []any

Details returns the error details

func (*ExpectedError) Error

func (ee *ExpectedError) Error() string

func (*ExpectedError) Unwrap

func (ee *ExpectedError) Unwrap() error

type MockChecker

type MockChecker struct {
	mock.Mock
}

MockChecker is the struct that mocks the Checker.

func (*MockChecker) Check

func (mc *MockChecker) Check(ctx context.Context) error

Check mocks the checker's check

func (*MockChecker) Identity

func (mc *MockChecker) Identity() (string, error)

Identity mocks the checker's identity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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