checker

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConnectionRefused added in v2.10.0

func IsConnectionRefused(err error) bool

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

func NewExpectedError added in v2.10.0

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 added in v2.10.0

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

ExpectedError defines the expectation error

func (*ExpectedError) Details added in v2.10.0

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

Details returns the error details

func (*ExpectedError) Error added in v2.10.0

func (ee *ExpectedError) Error() string

func (*ExpectedError) Unwrap added in v2.10.0

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