tester

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package tester is the testing package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockResty

func MockResty() *resty.Client

MockResty will return a mocked Resty client

func NewCustomResolver

func NewCustomResolver(liveResolver interfaces.DNSResolver, hosts map[string][]string,
	srvRecords map[string][]*net.SRV, ipAddresses map[string][]net.IPAddr) interfaces.DNSResolver

NewCustomResolver will return a custom resolver with specific records hard coded ,

Types

type Resolver

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

Resolver for mocking requests

func (*Resolver) LookupHost

func (r *Resolver) LookupHost(ctx context.Context, host string) ([]string, error)

LookupHost will lookup a host

func (*Resolver) LookupIPAddr

func (r *Resolver) LookupIPAddr(ctx context.Context, host string) ([]net.IPAddr, error)

LookupIPAddr will look up an ip address

func (*Resolver) LookupSRV

func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (string, []*net.SRV, error)

LookupSRV will look up an SRV record

Jump to

Keyboard shortcuts

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