discovery

package
v0.0.0-...-e5bfd48 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TargetHealthDead = 0
	TargetHealthLow  = 1
	TargetHealthGood = 10

	TargetHealthy   = true
	TargetUnhealthy = false

	TargetTypeShellyPlug = "shellyplug"
	TargetTypeShellyPlus = "shellyplus"
	TargetTypeShellyPro  = "shellypro"
)

Variables

View Source
var (
	ServiceDiscovery *serviceDiscovery
)

Functions

func EnableDiscovery

func EnableDiscovery(logger *zap.SugaredLogger, refreshTime time.Duration, timeout time.Duration, shellyplugs []string, shellyplus []string, shellypro []string)

Types

type DiscoveryTarget

type DiscoveryTarget struct {
	Hostname string
	Address  string
	Port     int
	Health   int
	Type     string
	Static   bool
}

func (*DiscoveryTarget) Name

func (t *DiscoveryTarget) Name() string

func (*DiscoveryTarget) Url

func (t *DiscoveryTarget) Url(path string) string

Jump to

Keyboard shortcuts

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