discoverer

package
v0.0.0-...-cb43b74 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discoverer

type Discoverer struct {
	Table   map[string]*ServiceEntry
	Storage string
	// contains filtered or unexported fields
}

func New

func New(location string) *Discoverer

func (*Discoverer) Discover

func (dv *Discoverer) Discover(stype string, timing time.Duration)

func (*Discoverer) Flush

func (dv *Discoverer) Flush()

type ServiceEntry

type ServiceEntry struct {
	Name      string    `json:"name,omitempty"`
	AddrV4    []net.IP  `json:"ip4,omitempty"`
	AddrV6    []net.IP  `json:"ip6,omitempty"`
	Port      int       `json:"port,omitempty"`
	TimeStamp time.Time `json:"timestamp,omitempty"`

	Text    []string `json:"text,omitempty"`
	TTL     uint32   `json:"TTL,omitempty"` //nolint:tagliatelle
	Service string   `json:"service,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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