discover

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	InstanceId string            `json:"instanceId"`
	Ip         string            `json:"ip"`
	Port       uint64            `json:"port"`
	Healthy    bool              `json:"healthy"`
	Enable     bool              `json:"enabled"`
	Metadata   map[string]string `json:"metadata"`
}

func (Instance) ID

func (i Instance) ID() string

type Interface

type Interface interface {
	GetAvailableInstances() ([]Instance, error)
	UpdateInstance(Instance) error
	Subscribe(callback func(services []Instance, err error)) error
	Register(i Instance) (bool, error)
	UnRegister(i Instance) (bool, error)
}

Jump to

Keyboard shortcuts

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