srvdisco

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 4 Imported by: 1

README

srvdisco

import "codeberg.org/mgkeller/srvdisco"

Overview

Index

Package files

discovery.go

func Discover

func Discover(domain, service, scheme string) (urls []string, err error)

Discover does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of URLs to use

func DiscoverAddrs

func DiscoverAddrs(domain, service string) (addresses []string, err error)

DiscoverAddrs does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of addresses/names to use

func DiscoverAddrsPorts

func DiscoverAddrsPorts(domain, service string) (addresses []string, err error)

DiscoverAddrsPorts does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of addresses/names and ports to use

func DiscoverChan

func DiscoverChan(domain, service, scheme string, discoChan chan url.URL, errorChan chan error)

DiscoverChan does a DNS SRV lookup on the specified domain, for the specified service, and streams url.URLs to use via discoChan, and errors over errorChan, closing both when done. If errorChan receives any messages, that signals the end of streams. An error of "Complete" is a non-error case. (Yeah, needs reworking)


Generated by godoc2md

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discover

func Discover(domain, service, scheme string) (urls []string, err error)

Discover does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of URLs to use

func DiscoverAddrs

func DiscoverAddrs(domain, service string) (addresses []string, err error)

DiscoverAddrs does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of addresses/names to use

func DiscoverAddrsPorts

func DiscoverAddrsPorts(domain, service string) (addresses []string, err error)

DiscoverAddrsPorts does a DNS SRV lookup on the specified domain, for the specified service, and returns a string array of addresses/names and ports to use

func DiscoverChan

func DiscoverChan(domain, service, scheme string, discoChan chan url.URL, errorChan chan error)

DiscoverChan does a DNS SRV lookup on the specified domain, for the specified service, and streams url.URLs to use via discoChan, and errors over errorChan, closing both when done. If errorChan receives any messages, that signals the end of streams. An error of "Complete" is a non-error case. (Yeah, needs reworking)

Types

This section is empty.

Jump to

Keyboard shortcuts

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