Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
*grpc.Server
Port int
// 向前兼容,默认依旧使用etcd,要用consul时才把这个字段设置成true,并传递consul地址
UseConsulClient bool
EtcdAddrs []string
ConsulAddrs string
Name string
L logger.Logger
// 微服务是否以host模式运行,是host则自动获取本地ip地址注册到注册中心
// 不是host模式则以Name作为微服务访问地址(k8s中则为svc名称,docker中则为container名称)
IsHost bool
// 是否使用本仓库的权重负载均衡,使用则传递Weight为权重值
UseWrr bool
// 使用权重负载均衡,又没传weight则默认为10
// weight建议为10的整数倍
Weight int
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.