globalconfigsync

package
v7.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GlobalConfigPath = "/global/config/"

GlobalConfigPath as Etcd prefix

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalConfigSyncer

type GlobalConfigSyncer struct {
	NotifyCh chan pd.GlobalConfigItem
	// contains filtered or unexported fields
}

GlobalConfigSyncer is used to sync pd global config.

func NewGlobalConfigSyncer

func NewGlobalConfigSyncer(p pd.Client) *GlobalConfigSyncer

NewGlobalConfigSyncer creates a GlobalConfigSyncer.

func (*GlobalConfigSyncer) Notify

func (s *GlobalConfigSyncer) Notify(globalConfigItem pd.GlobalConfigItem)

Notify pushes global config to internal channel and will be sync into pd's GlobalConfig.

func (*GlobalConfigSyncer) StoreGlobalConfig

func (s *GlobalConfigSyncer) StoreGlobalConfig(ctx context.Context, item pd.GlobalConfigItem) error

StoreGlobalConfig is used to store global config.

Jump to

Keyboard shortcuts

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