discovery

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceChangedCallback

type ServiceChangedCallback func(info api.ServiceInfo)

ServiceChangedCallback is type for callbacks a service change has been detected.

type ServiceListener

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

ServiceListener is a service that listens for service registrations for a specific type of service.

func NewServiceListener

func NewServiceListener(log zerolog.Logger, serviceType string, all bool, cb ServiceChangedCallback) *ServiceListener

NewServiceListener creates and initializes a ServiceListener. If all is false, only changes in service info are reported. If all is true, all service info messages are reported.

func (*ServiceListener) Run

func (l *ServiceListener) Run(ctx context.Context) error

Run the listener until the given context is canceled.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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