configcenter

package
v3.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFromLocalFile

func LoadConfigFromLocalFile(confPath string, handler *CCHandler) error

func New

func New(ctx context.Context, procName string, confPath string, disc crd.ConfRegDiscvIf, handler *CCHandler) error

func NewConfigCenter

func NewConfigCenter(ctx context.Context, zkAddr string, procName string, confPath string, handler *CCHandler) error

Types

type CC

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

type CCHandler

type CCHandler struct {
	OnProcessUpdate  ProcHandlerFunc
	OnLanguageUpdate func(previous, current map[string]language.LanguageMap)
	OnErrorUpdate    func(previous, current map[string]errors.ErrorCode)
}

type ProcHandlerFunc

type ProcHandlerFunc func(previous, current ProcessConfig)

type ProcessConfig

type ProcessConfig struct {
	ConfigMap map[string]string
}

func ParseConfigWithData

func ParseConfigWithData(data []byte) (*ProcessConfig, error)

func ParseConfigWithFile

func ParseConfigWithFile(filePath string) (*ProcessConfig, error)

Jump to

Keyboard shortcuts

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