remote

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotExistedFileContent = string("@@not_existed@@")
)

Variables

This section is empty.

Functions

func InitLongPollingService

func InitLongPollingService(connector configconnector.ConfigConnector)

InitLongPollingService 初始化长轮询服务

func StopCheckVersionTask

func StopCheckVersionTask()

StopCheckVersionTask 停止检查版本任务

func StopLongPollingTask

func StopLongPollingTask()

StopLongPollingTask 停止长轮询任务

Types

type ConfigFileRepo

type ConfigFileRepo struct {
	// contains filtered or unexported fields
}

ConfigFileRepo 服务端配置文件代理类,从服务端拉取配置并同步数据

func NewConfigFileRepo

func NewConfigFileRepo(metadata model.ConfigFileMetadata,
	connector configconnector.ConfigConnector,
	configuration config.Configuration) (*ConfigFileRepo, error)

NewConfigFileRepo 创建远程配置文件

func (*ConfigFileRepo) AddChangeListener

func (r *ConfigFileRepo) AddChangeListener(listener ConfigFileRepoChangeListener)

AddChangeListener 添加配置文件变更监听器

func (*ConfigFileRepo) GetContent

func (r *ConfigFileRepo) GetContent() string

GetContent 获取配置文件内容

type ConfigFileRepoChangeListener

type ConfigFileRepoChangeListener func(configFileMetadata model.ConfigFileMetadata, newContent string) error

ConfigFileRepoChangeListener 远程配置文件发布监听器

Jump to

Keyboard shortcuts

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