Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigData ¶
type ConfigData struct {
AppID string `json:"appId"` // 应用ID
Cluster string `json:"cluster"` // 集群名称
Namespace string `json:"namespaceName"` // 命名空间
Configs map[string]string `json:"configurations"` // 配置项列表
ReleaseKey string `json:"releaseKey"` // 当前的releaseKey
}
ConfigService :Apollo分布式配置中心真正存储配置数据的服务,提供不带缓存和带缓存两种方式拉取配置
type ConfigService ¶
type ConfigService interface {
GetConfig(param *GetConfigParam) (ConfigData, error)
GetConfigCache(param *GetConfigParam) (ConfigData, error)
GetNotifications(param *GetNotificationsParam) (bool, []Notification, error)
}
ConfigService :Apollo分布式配置中心真正存储配置数据的服务,提供不带缓存和带缓存两种方式拉取配置
func NewConfigService ¶
func NewConfigService(httpClient *http.Client, serverAddr string) (ConfigService, error)
type GetConfigParam ¶
type GetConfigParam struct {
AppID string // 应用ID,必填
Cluster string // 集群名称,选填
Namespace string // 命名空间,必填
Secret string // 授权密钥,选填
ReleaseKey string // 上一次的releaseKey,选填
ClientIP string // 应用部署机器IP,选填
}
ConfigService :Apollo分布式配置中心真正存储配置数据的服务,提供不带缓存和带缓存两种方式拉取配置
type GetNotificationsParam ¶
type GetNotificationsParam struct {
AppID string // 应用ID,必填
Cluster string // 集群名称,必填
Secret string // 授权密钥,必填
Notifications []Notification // 通知列表,必填
}
ConfigService :Apollo分布式配置中心真正存储配置数据的服务,提供不带缓存和带缓存两种方式拉取配置
type Notification ¶
type Notification struct {
Namespace string `json:"namespaceName"` // 命名空间,必填
NotificationID int64 `json:"notificationId"` // 通知ID,必填
}
ConfigService :Apollo分布式配置中心真正存储配置数据的服务,提供不带缓存和带缓存两种方式拉取配置
Click to show internal directories.
Click to hide internal directories.