discover

package
v1.1.35 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddress added in v1.0.21

func GetAddress(srv string) string

func GetAddressWithTag added in v1.0.21

func GetAddressWithTag(srv, tag string) string

func GetAddresses added in v1.0.21

func GetAddresses(srv string) []string

func SetFinder added in v1.1.1

func SetFinder(finder ServiceFinder)

Types

type Service

type Service struct {
	ServiceName string
	Address     string
	Tags        []string
}

type ServiceFinder

type ServiceFinder interface {
	GetAddress(service string) string
	GetAllAddress(service string) []string
	GetAddressWithTag(service, tag string) string
	GetAllAddressWithTag(service, tag string) []string

	RegisterService(service, address string) error
	RegisterServiceWithTag(service, address, tag string) error
	RegisterServiceWithTags(service, address string, tags []string) error
	Close()
}

func GetServiceFinder

func GetServiceFinder() ServiceFinder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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