resolver

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomAddr

func GetRandomAddr(ctx context.Context, serviceName string) (string, error)

GetRandomAddr 取得指定服务名的地址列表中的一个随机地址

func GetServiceAddr

func GetServiceAddr(ctx context.Context, serviceName string) ([]string, error)

GetServiceAddr 获取指定服务名的地址列表

Types

type ConsulResolver

type ConsulResolver struct {
	// contains filtered or unexported fields
}

ConsulResolver 封装consul相关操作,单例模式

func GetConsulResolver

func GetConsulResolver() *ConsulResolver

GetConsulResolver 获取consul resolver实例

Jump to

Keyboard shortcuts

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