Documentation ¶
Overview ¶
实现文件 基于 consul 实现的服务发现
Index ¶
Constants ¶
View Source
const ( // DiscoverTag 用于docker发现的tag, 所有希望被discover服务发现的节点, // 都应该在Dockerfile中设置 ENV SERVICE_TAGS=braid DiscoverTag = "braid" )
Variables ¶
View Source
var ( // ErrConfigConvert 配置转换失败 ErrConfigConvert = errors.New("convert config error") )
Functions ¶
Types ¶
type Option ¶
type Option func(*Parm)
Option consul discover config wrapper
func WithSyncServiceInterval ¶
WithSyncServiceInterval 修改config中的interval
func WithSyncServiceWeightInterval ¶
WithSyncServiceWeightInterval 修改权重同步间隔
Click to show internal directories.
Click to hide internal directories.