discovery

package
v0.0.0-...-0c72a7a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 6 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)

Types

type DiscoveryTarget

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

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