Documentation ¶
Index ¶
- func GetConfig(groupCtx *GroupContext, key string) string
- func GetConfigKey(rk string) string
- func ResettingArray(groupCtx *GroupContext, source []string) ([]string, error)
- func ResettingMap(groupCtx *GroupContext, source map[string]string) (map[string]string, error)
- func ResettingString(groupCtx *GroupContext, source string) (string, error)
- type DataCenterConfig
- func (d *DataCenterConfig) CacheConfig(c *model.ConfigUnit) error
- func (d *DataCenterConfig) DeleteConfig(name string)
- func (d *DataCenterConfig) GetConfig(name string) *model.ConfigUnit
- func (d *DataCenterConfig) GetDataCenterConfig() (*model.GlobalConfig, error)
- func (d *DataCenterConfig) GetGroupConfig(groupID string) *GroupContext
- func (d *DataCenterConfig) PutConfig(c *model.ConfigUnit) error
- func (d *DataCenterConfig) PutConfigKV(kv *mvccpb.KeyValue)
- func (d *DataCenterConfig) PutDataCenterConfig(c *model.GlobalConfig) (err error)
- func (d *DataCenterConfig) Start()
- func (d *DataCenterConfig) Stop()
- type GroupContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResettingArray ¶
func ResettingArray(groupCtx *GroupContext, source []string) ([]string, error)
ResettingArray 根据实际配置解析数组字符串
func ResettingMap ¶
ResettingMap 根据实际配置解析Map字符串
func ResettingString ¶
func ResettingString(groupCtx *GroupContext, source string) (string, error)
ResettingString 根据实际配置解析字符串
Types ¶
type DataCenterConfig ¶
type DataCenterConfig struct {
// contains filtered or unexported fields
}
DataCenterConfig 数据中心配置
func CreateDataCenterConfig ¶
func CreateDataCenterConfig() *DataCenterConfig
CreateDataCenterConfig 创建
func (*DataCenterConfig) CacheConfig ¶
func (d *DataCenterConfig) CacheConfig(c *model.ConfigUnit) error
CacheConfig 更新配置缓存
func (*DataCenterConfig) DeleteConfig ¶
func (d *DataCenterConfig) DeleteConfig(name string)
DeleteConfig 删除配置
func (*DataCenterConfig) GetConfig ¶
func (d *DataCenterConfig) GetConfig(name string) *model.ConfigUnit
GetConfig 获取全局配置
func (*DataCenterConfig) GetDataCenterConfig ¶
func (d *DataCenterConfig) GetDataCenterConfig() (*model.GlobalConfig, error)
GetDataCenterConfig 获取配置
func (*DataCenterConfig) GetGroupConfig ¶
func (d *DataCenterConfig) GetGroupConfig(groupID string) *GroupContext
GetGroupConfig get group config
func (*DataCenterConfig) PutConfig ¶
func (d *DataCenterConfig) PutConfig(c *model.ConfigUnit) error
PutConfig 增加or更新配置
func (*DataCenterConfig) PutConfigKV ¶
func (d *DataCenterConfig) PutConfigKV(kv *mvccpb.KeyValue)
PutConfigKV 更新
func (*DataCenterConfig) PutDataCenterConfig ¶
func (d *DataCenterConfig) PutDataCenterConfig(c *model.GlobalConfig) (err error)
PutDataCenterConfig 更改配置
type GroupContext ¶
type GroupContext struct {
// contains filtered or unexported fields
}
GroupContext 组任务会话
func (*GroupContext) GetString ¶
func (g *GroupContext) GetString(k interface{}) string
GetString get
Click to show internal directories.
Click to hide internal directories.