dns

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverCastDNSEntries

func DiscoverCastDNSEntries(ctx context.Context, iface *net.Interface) (<-chan CastEntry, error)

DiscoverCastDNSEntries will return a channel with any cast dns entries found.

Types

type CastDNSEntry

type CastDNSEntry interface {
	GetName() string
	GetUUID() string
	GetAddr() string
	GetPort() int
}

CastDNSEntry is the interface that satisfies a Cast type.

type CastEntry

type CastEntry struct {
	AddrV4 net.IP
	AddrV6 net.IP
	Port   int

	Name string
	Host string

	UUID       string
	Device     string
	Status     string
	DeviceName string
	InfoFields map[string]string
}

CastEntry is the concrete cast entry type.

func DiscoverCastDNSEntryByName

func DiscoverCastDNSEntryByName(ctx context.Context, iface *net.Interface, name string) (CastEntry, error)

DiscoverCastDNSEntryByName returns the first cast dns device found that matches the name.

func (CastEntry) GetAddr

func (e CastEntry) GetAddr() string

GetAddr returns the IPV4 of a cast entry if it is not nil otherwise the IPV6.

func (CastEntry) GetName

func (e CastEntry) GetName() string

GetName returns the identified name of a cast entry.

func (CastEntry) GetPort

func (e CastEntry) GetPort() int

GetPort returns the port of a cast entry.

func (CastEntry) GetUUID

func (e CastEntry) GetUUID() string

GetUUID returns a unqiue id of a cast entry.

Jump to

Keyboard shortcuts

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