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: 8 Imported by: 0

Documentation

Overview

Package injecterror provides chain elements returning given error on Register, Unregister on given times

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworkServiceEndpointRegistryClient

func NewNetworkServiceEndpointRegistryClient(opts ...Option) registry.NetworkServiceEndpointRegistryClient

NewNetworkServiceEndpointRegistryClient returns a client chain element returning error on Register/Find/Unregister on given times

func NewNetworkServiceEndpointRegistryServer

func NewNetworkServiceEndpointRegistryServer(opts ...Option) registry.NetworkServiceEndpointRegistryServer

NewNetworkServiceEndpointRegistryServer returns a server chain element returning error on Register/Find/Unregister on given times

func NewNetworkServiceRegistryClient added in v1.2.0

func NewNetworkServiceRegistryClient(opts ...Option) registry.NetworkServiceRegistryClient

NewNetworkServiceRegistryClient returns a client chain element returning error on Register/Find/Unregister on given times

func NewNetworkServiceRegistryServer added in v1.10.0

func NewNetworkServiceRegistryServer(opts ...Option) registry.NetworkServiceRegistryServer

NewNetworkServiceRegistryServer returns a server chain element returning error on Register/Find/Unregister on given times

Types

type Option

type Option func(o *options)

Option is an option pattern for injecterror package

func WithError

func WithError(err error) Option

WithError sets error

func WithFindErrorTimes

func WithFindErrorTimes(failureTimes ...int) Option

WithFindErrorTimes sets Find error times

func WithRegisterErrorTimes

func WithRegisterErrorTimes(failureTimes ...int) Option

WithRegisterErrorTimes sets Register error times

func WithUnregisterErrorTimes

func WithUnregisterErrorTimes(failureTimes ...int) Option

WithUnregisterErrorTimes sets Unregister error times

Jump to

Keyboard shortcuts

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