Categorygithub.com/illidaris/configuration
modulepackage
1.3.3
Repository: https://github.com/illidaris/configuration.git
Documentation: pkg.go.dev

# README

configuration

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithChoose 是一个用于设置发现选项中选择函数的 DiscoverOptionFunc 构造函数。 参数: choose - 一个实现了 IChooseFunc 接口的选择函数,用于在发现过程中进行选择逻辑的定制。 返回值: 返回一个 DiscoverOptionFunc,它是一个函数类型,接受 discoverOptions 指针作为参数,用于配置发现选项。.
WithCluster 返回一个DiscoverOptionFunc,用来添加一个集群名到发现选项的clusters列表中 参数cluster: 要添加的集群名.
WithGroup 返回一个DiscoverOptionFunc,用来设置发现选项中的group字段 参数group: 要设置的组名.
WithService 返回一个DiscoverOptionFunc,用来设置发现选项中的service字段 参数service: 要设置的服务名.
WithVersion 返回一个DiscoverOptionFunc,用来添加一个版本到发现选项的versions列表中 参数version: 要添加的版本号.

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

Chooser 结构体用于存储实例列表及其累计权重,以便进行随机选择。.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
定义DiscoverOptionFunc类型,它是一个函数类型,接收一个discoverOptions指针并对其进行修改.
IChooseFunc 是一个函数类型,用于从多个model.Instance中选择一个。 参数instances是可变长度的model.Instance类型切片。 返回值是一个model.Instance类型,表示选择的结果。.
InstanceSlice 是model.Instance类型切片的自定义类型。.