mdns

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service = "service"
	Domain  = "domain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

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

Discovery represents the mDNS discovery provider

func New

func New(logger log.Logger) *Discovery

New returns an instance of the kubernetes discovery provider

func (*Discovery) EarliestNode

func (d *Discovery) EarliestNode(context.Context) (*discovery.Node, error)

EarliestNode returns the earliest node. This is based upon the node timestamp

func (*Discovery) ID

func (d *Discovery) ID() string

ID returns the discovery id

func (*Discovery) Nodes

func (d *Discovery) Nodes(ctx context.Context) ([]*discovery.Node, error)

Nodes returns the list of Nodes at a given time

func (*Discovery) Start

func (d *Discovery) Start(_ context.Context, meta discovery.Meta) error

Start the discovery engine

func (*Discovery) Stop

func (d *Discovery) Stop() error

Stop shutdown the discovery engine

func (*Discovery) Watch

func (d *Discovery) Watch(ctx context.Context) (<-chan discovery.Event, error)

Watch returns event based upon node lifecycle

type Option

type Option struct {
	// Service specifies the service instance
	Service string
	// Specifies the service domain
	Domain string
}

Option represents the mDNS provider option

Jump to

Keyboard shortcuts

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