Documentation ¶
Index ¶
Constants ¶
View Source
const ContextKey contextKey = "sessionid"
ContextKey 全局context变量Key值
sessionID表示服务链路上一次完成的请求 一般从API网关产生,保证每次请求唯一,并在服务链路上始终保持传输 可用于服务链路追踪使用
Variables ¶
This section is empty.
Functions ¶
func ServiceRegistry ¶
func ServiceRegistry(conf *config.ConfigFile, sType ServiceTransportType, logger log.Logger) *etcdv3.Registrar
ServiceRegistry 服务注册方法
Types ¶
type ServiceTransportType ¶
type ServiceTransportType int
ServiceTransportType 服务注册的通讯协议自定义类型
const ( GRPCTransport ServiceTransportType HTTPTransport )
服务注册的通讯协议类型枚举
Click to show internal directories.
Click to hide internal directories.