rainbond: github.com/goodrain/rainbond/node/core/config Index | Files

package config

import "github.com/goodrain/rainbond/node/core/config"

Index

Package Files

datacenter.go taskconfig.go

func GetConfig Uses

func GetConfig(groupCtx *GroupContext, key string) string

GetConfig 获取配置信息

func GetConfigKey Uses

func GetConfigKey(rk string) string

GetConfigKey 获取配置key

func ResettingArray Uses

func ResettingArray(groupCtx *GroupContext, source []string) ([]string, error)

ResettingArray 根据实际配置解析数组字符串

func ResettingMap Uses

func ResettingMap(groupCtx *GroupContext, source map[string]string) (map[string]string, error)

ResettingMap 根据实际配置解析Map字符串

func ResettingString Uses

func ResettingString(groupCtx *GroupContext, source string) (string, error)

ResettingString 根据实际配置解析字符串

type DataCenterConfig Uses

type DataCenterConfig struct {
    // contains filtered or unexported fields
}

DataCenterConfig 数据中心配置

func CreateDataCenterConfig Uses

func CreateDataCenterConfig() *DataCenterConfig

CreateDataCenterConfig 创建

func GetDataCenterConfig Uses

func GetDataCenterConfig() *DataCenterConfig

GetDataCenterConfig 获取

func (*DataCenterConfig) CacheConfig Uses

func (d *DataCenterConfig) CacheConfig(c *model.ConfigUnit) error

CacheConfig 更新配置缓存

func (*DataCenterConfig) DeleteConfig Uses

func (d *DataCenterConfig) DeleteConfig(name string)

DeleteConfig 删除配置

func (*DataCenterConfig) GetConfig Uses

func (d *DataCenterConfig) GetConfig(name string) *model.ConfigUnit

GetConfig 获取全局配置

func (*DataCenterConfig) GetDataCenterConfig Uses

func (d *DataCenterConfig) GetDataCenterConfig() (*model.GlobalConfig, error)

GetDataCenterConfig 获取配置

func (*DataCenterConfig) GetGroupConfig Uses

func (d *DataCenterConfig) GetGroupConfig(groupID string) *GroupContext

GetGroupConfig get group config

func (*DataCenterConfig) PutConfig Uses

func (d *DataCenterConfig) PutConfig(c *model.ConfigUnit) error

PutConfig 增加or更新配置

func (*DataCenterConfig) PutConfigKV Uses

func (d *DataCenterConfig) PutConfigKV(kv *mvccpb.KeyValue)

PutConfigKV 更新

func (*DataCenterConfig) PutDataCenterConfig Uses

func (d *DataCenterConfig) PutDataCenterConfig(c *model.GlobalConfig) (err error)

PutDataCenterConfig 更改配置

func (*DataCenterConfig) Start Uses

func (d *DataCenterConfig) Start()

Start 启动,监听配置变化

func (*DataCenterConfig) Stop Uses

func (d *DataCenterConfig) Stop()

Stop 停止监听

type GroupContext Uses

type GroupContext struct {
    // contains filtered or unexported fields
}

GroupContext 组任务会话

func NewGroupContext Uses

func NewGroupContext(groupID string) *GroupContext

NewGroupContext 创建组配置会话

func (*GroupContext) Add Uses

func (g *GroupContext) Add(k, v interface{})

Add 添加配置项

func (*GroupContext) Get Uses

func (g *GroupContext) Get(k interface{}) interface{}

Get get

func (*GroupContext) GetString Uses

func (g *GroupContext) GetString(k interface{}) string

GetString get

Package config imports 13 packages (graph) and is imported by 4 packages. Updated 2018-07-06. Refresh now. Tools for package owners.