endpoint

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPreferencer

func NewPreferencer(ctx context.Context, opt ...Option) (*preferencer, error)

NewPreferencer builds up a preferencer with a set of preference options. This can then be used with Choose to select preferences from among a set of IP addresses and DNS names.

Supported options: WithPreferenceOrder

Types

type Option

type Option func(*options) error

Option - how Options are passed as arguments

func WithDnsNames

func WithDnsNames(with []string) Option

WithDnsNames contains DNS names to add into the endpoint possibilities

func WithIpAddrs

func WithIpAddrs(with []string) Option

WithIpAddrs contains IP addresses to add into the endpoint possibilities. If an IP cannot be parsed, this function will error.

func WithPreferenceOrder

func WithPreferenceOrder(with []string) Option

WithPreferenceOrder contains the preference order specification. If one of the preferences cannot be parsed, this function will error. Internally it builds up a set of matchers.

Jump to

Keyboard shortcuts

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