configconnector

package
v1.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigConnector

type ConfigConnector interface {
	plugin.Plugin
	// GetConfigFile Get config file
	GetConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)
	// WatchConfigFiles Watch config files
	WatchConfigFiles(configFileList []*ConfigFile) (*ConfigFileResponse, error)
}

ConfigConnector interface of config connector plugin

type ConfigFile

type ConfigFile struct {
	Namespace string
	FileGroup string
	FileName  string
	Content   string
	Version   uint64
	Md5       string
}

ConfigFile 配置文件

func (*ConfigFile) GetContent

func (c *ConfigFile) GetContent() string

GetContent 获取配置文件内容

func (*ConfigFile) GetFileGroup

func (c *ConfigFile) GetFileGroup() string

GetFileGroup 获取配置文件组

func (*ConfigFile) GetFileName

func (c *ConfigFile) GetFileName() string

GetFileName 获取配置文件名

func (*ConfigFile) GetMd5

func (c *ConfigFile) GetMd5() string

GetMd5 获取配置文件MD5值

func (*ConfigFile) GetNamespace

func (c *ConfigFile) GetNamespace() string

GetNamespace 获取配置文件命名空间

func (*ConfigFile) GetVersion

func (c *ConfigFile) GetVersion() uint64

GetVersion 获取配置文件版本号

type ConfigFileResponse

type ConfigFileResponse struct {
	Code       uint32
	Message    string
	ConfigFile *ConfigFile
}

ConfigFileResponse 配置文件响应体

func (*ConfigFileResponse) GetCode

func (c *ConfigFileResponse) GetCode() uint32

GetCode 获取配置文件响应体code

func (*ConfigFileResponse) GetConfigFile

func (c *ConfigFileResponse) GetConfigFile() *ConfigFile

GetConfigFile 获取配置文件响应体内容

func (*ConfigFileResponse) GetMessage

func (c *ConfigFileResponse) GetMessage() string

GetMessage 获取配置文件响应体信息

type Proxy

type Proxy struct {
	ConfigConnector
	// contains filtered or unexported fields
}

func (*Proxy) GetConfigFile

func (p *Proxy) GetConfigFile(configFile *ConfigFile) (*ConfigFileResponse, error)

GetConfigFile Get config file

func (*Proxy) SetRealPlugin

func (p *Proxy) SetRealPlugin(plugin plugin.Plugin, engine model.Engine)

func (*Proxy) WatchConfigFiles

func (p *Proxy) WatchConfigFiles(configFileList []*ConfigFile) (*ConfigFileResponse, error)

WatchConfigFiles Watch config files

Jump to

Keyboard shortcuts

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