srv

package
v0.0.0-...-25c0d99 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	Lookup(domainName string) ([]*Target, error)
}

Resolver is an implementation of a DNS SRV resolver for a domain.

func NewGoResolver

func NewGoResolver(dummyTtl time.Duration) Resolver

NewGoResolver is a resolver that uses net-package LookupSRV. It doesn't support TTL expiration and as such returns a dummy TTL. It's also very inefficient for large targets.

type Target

type Target struct {
	DialAddr string
	Ttl      time.Duration
}

Target is a resolved backend behind an SRV address pool.

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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