mock

package
v1.17.6-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResolver

func NewResolver(opts ...Option) resolver.Interface

NewResolver will create a new mock Resolver.

Types

type Option

type Option func(*Resolver)

Option function sets the option on the mock Resolver.

func WithResolveFunc

func WithResolveFunc(f func(string) (resolver.Address, error)) Option

WithResolveFunc will override the Resolve function implementation.

type Resolver

type Resolver struct {
	IsClosed bool
	// contains filtered or unexported fields
}

Resolver is the mock Resolver implementation.

func (*Resolver) Close

func (r *Resolver) Close() error

Close implements the Resolver interface.

func (*Resolver) Resolve

func (r *Resolver) Resolve(name string) (resolver.Address, error)

Resolve implements the Resolver interface.

Jump to

Keyboard shortcuts

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