dnssdtest

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dnssdtest is a fake Avahi on a private bus: the services a test announces are reported to every browser of their type, once per address, on the interface and protocol the address names, and resolve to what the test set; the browsers made and freed are counted.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Avahi

type Avahi struct {
	// Bus is the private bus the fake owns Avahi's name on.
	Bus *dbustest.Bus
	// Created and Freed count the browsers made and freed.
	Created, Freed dbustest.Var[int]
	// contains filtered or unexported fields
}

Avahi is the fake.

func Start

func Start(t *testing.T) *Avahi

Start runs the fake on a private bus.

func (*Avahi) Announce

func (a *Avahi) Announce(t *testing.T, s dnssd.Service)

Announce adds a service at one address, reporting it to the browsers of its type; a service announced at several addresses is one per interface and protocol, as Avahi's are.

func (*Avahi) Browsing

func (a *Avahi) Browsing(typ string) []dbus.ObjectPath

Browsing are the browsers of typ.

func (*Avahi) Emit

func (a *Avahi) Emit(t *testing.T, path dbus.ObjectPath, name string, args ...any)

Emit sends the signal name from Avahi's object at path, carrying args.

func (*Avahi) Withdraw

func (a *Avahi) Withdraw(t *testing.T, s dnssd.Service)

Withdraw removes a service at the address s names, reporting it gone from there to the browsers of its type.

Jump to

Keyboard shortcuts

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