mock

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the mock resolver client implementation.

func NewClient

func NewClient(opts ...Option) *Client

NewClient construct a new mock Client.

func (*Client) Close

func (cl *Client) Close() error

Close is the mock Close implementation.

func (*Client) Endpoint

func (cl *Client) Endpoint() string

Endpoint is the mock Endpoint implementation.

func (*Client) IsConnected

func (cl *Client) IsConnected() bool

IsConnected is the mock IsConnected implementation.

func (*Client) Resolve

func (cl *Client) Resolve(name string) (boson.Address, error)

Resolve is the mock Resolve implementation

type Option

type Option func(*Client)

Option is a function that applies an option to a Client.

func WitResolveAddress

func WitResolveAddress(addr boson.Address) Option

WitResolveAddress will set the address returned by Resolve.

func WithEndpoint

func WithEndpoint(endpoint string) Option

WithEndpoint will set the endpoint.

func WithResolveFunc

func WithResolveFunc(fn func(string) (boson.Address, error)) Option

WithResolveFunc will set the Resolve function implementation.

Jump to

Keyboard shortcuts

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