processor

package
v0.0.0-...-a3dc05e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

* TODO http连接复用,参数设置细化

Index

Constants

View Source
const BaseDir = "config-data"

BaseDir local file base dir

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalConfigInfoProcessor

type LocalConfigInfoProcessor struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

type ServerAddressProcessor struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

func (*ServerAddressProcessor) Stop

func (p *ServerAddressProcessor) Stop()

Stop stop 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL