Documentation ¶
Overview ¶
* TODO http连接复用,参数设置细化
Index ¶
Constants ¶
const BaseDir = "config-data"
BaseDir local file base dir
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalConfigInfoProcessor ¶
LocalConfigInfoProcessor local file processor
func NewLocalConfigInfoProcessor ¶
func NewLocalConfigInfoProcessor() *LocalConfigInfoProcessor
NewLocalConfigInfoProcessor new
func (*LocalConfigInfoProcessor) GetLocalConfigureInformation ¶
func (p *LocalConfigInfoProcessor) GetLocalConfigureInformation(cacheData *configinfo.CacheData, force bool) (string, error)
GetLocalConfigureInformation get config info from local file
func (*LocalConfigInfoProcessor) Start ¶
func (p *LocalConfigInfoProcessor) Start(rootPath string)
Start setup processor and create local file dir
func (*LocalConfigInfoProcessor) Stop ¶
func (p *LocalConfigInfoProcessor) Stop()
Stop stop processor
type ServerAddressProcessor ¶
ServerAddressProcessor name server address processor
func NewServerAddressProcessor ¶
func NewServerAddressProcessor(diamondConfigure *configinfo.Configure) *ServerAddressProcessor
NewServerAddressProcessor new
func (*ServerAddressProcessor) Start ¶
func (p *ServerAddressProcessor) Start()
Start setup processor
type SnapshotConfigInfoProcessor ¶
type SnapshotConfigInfoProcessor struct {
// contains filtered or unexported fields
}
SnapshotConfigInfoProcessor local snapshot file processor
func NewSnapshotConfigInfoProcessor ¶
func NewSnapshotConfigInfoProcessor(dir string) *SnapshotConfigInfoProcessor
NewSnapshotConfigInfoProcessor new
func (*SnapshotConfigInfoProcessor) GetConfigInfomation ¶
func (p *SnapshotConfigInfoProcessor) GetConfigInfomation(dataId, group string) (string, error)
GetConfigInfomation read snapshot data from local file if err return it come from ioutil.ReadFile
func (*SnapshotConfigInfoProcessor) RemoveSnapshot ¶
func (p *SnapshotConfigInfoProcessor) RemoveSnapshot(dataId, group string)
RemoveSnapshot remove snapshot config local file,if the dir is empty it will remove the dir
func (*SnapshotConfigInfoProcessor) SaveSnaptshot ¶
func (p *SnapshotConfigInfoProcessor) SaveSnaptshot(dataId, group, config string) error
SaveSnaptshot save config data to snapshot local file if dataId or group it will return err