discodns

package module
v0.0.0-...-6de2257 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Overview

Package discodns contains Rafty Discoverers which leverage the use of DNS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SRVDiscoverer

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

SRVDiscoverer is a Rafty discoverer which leverages the use of DNS and SRV records.

func NewSRVDiscoverer

func NewSRVDiscoverer(srvRecord string, options ...SRVOption) (*SRVDiscoverer, error)

func (*SRVDiscoverer) GetServers

func (d *SRVDiscoverer) GetServers() []raft.Server

func (*SRVDiscoverer) NewServers

func (d *SRVDiscoverer) NewServers() chan struct{}

func (*SRVDiscoverer) Start

func (d *SRVDiscoverer) Start(ctx context.Context) error

type SRVOption

type SRVOption func(*SRVDiscoverer) error

func Client

func Client(client *dns.Client) SRVOption

func Interval

func Interval(interval time.Duration) SRVOption

func Logger

func Logger(logger interfaces.Logger) SRVOption

func Nameserver

func Nameserver(nameserver string) SRVOption

Jump to

Keyboard shortcuts

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