injecterror

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package injecterror provides chain elements returning given error on Request, Close on given times

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts ...Option) networkservice.NetworkServiceClient

NewClient returns a client chain element returning error on Close/Request on given times

func NewServer

func NewServer(opts ...Option) networkservice.NetworkServiceServer

NewServer returns a server chain element returning error on Close/Request on given times

Types

type Option

type Option func(o *options)

Option is an option pattern for injectErrorClient/Server

func WithCloseErrorTimes

func WithCloseErrorTimes(failureTimes ...int) Option

WithCloseErrorTimes sets injectErrorClient/Server close error times

func WithError

func WithError(err error) Option

WithError sets injectErrorClient/Server error

func WithRequestErrorTimes

func WithRequestErrorTimes(failureTimes ...int) Option

WithRequestErrorTimes sets injectErrorClient/Server request error times

Jump to

Keyboard shortcuts

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