config_client

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigClient

type ConfigClient struct {
	nacos_client.INacosClient
	// contains filtered or unexported fields
}

func NewConfigClient

func NewConfigClient(nc nacos_client.INacosClient) (ConfigClient, error)

func (*ConfigClient) CancelListenConfig

func (client *ConfigClient) CancelListenConfig(param vo.ConfigParam) (err error)

Cancel Listen Config

func (*ConfigClient) DeleteConfig

func (client *ConfigClient) DeleteConfig(param vo.ConfigParam) (deleted bool, err error)

func (*ConfigClient) GetConfig

func (client *ConfigClient) GetConfig(param vo.ConfigParam) (content string, err error)

func (*ConfigClient) GetConfigHistoryDetailById added in v1.0.13

func (client *ConfigClient) GetConfigHistoryDetailById(id string) (*model.ConfigItem, error)

func (*ConfigClient) GetConfigHistoryPre

func (client *ConfigClient) GetConfigHistoryPre(id string) (content string, err error)

func (*ConfigClient) ListenConfig

func (client *ConfigClient) ListenConfig(param vo.ConfigParam) (err error)

func (*ConfigClient) PublishConfig

func (client *ConfigClient) PublishConfig(param vo.ConfigParam) (published bool,
	err error)

func (*ConfigClient) SearchConfig

func (client *ConfigClient) SearchConfig(param vo.SearchConfigParm) (*model.ConfigPage, error)

func (*ConfigClient) SearchConfigHistory

func (client *ConfigClient) SearchConfigHistory(param vo.SearchHistoryParam) (*model.ConfigPage, error)

type ConfigProxy

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

func NewConfigProxy

func NewConfigProxy(serverConfig []constant.ServerConfig, clientConfig constant.ClientConfig, httpAgent http_agent.IHttpAgent) (ConfigProxy, error)

func (*ConfigProxy) DeleteConfigProxy

func (cp *ConfigProxy) DeleteConfigProxy(param vo.ConfigParam, tenant, accessKey, secretKey string) (bool, error)

func (*ConfigProxy) GetConfigHistoryDetailProxy added in v1.0.13

func (cp *ConfigProxy) GetConfigHistoryDetailProxy(id, tenant, accessKey, secretKey string) (*model.ConfigItem, error)

func (*ConfigProxy) GetConfigHistoryPre

func (cp *ConfigProxy) GetConfigHistoryPre(id, tenant, accessKey, secretKey string) (string, error)

func (*ConfigProxy) GetConfigProxy

func (cp *ConfigProxy) GetConfigProxy(param vo.ConfigParam, tenant, accessKey, secretKey string) (string, error)

func (*ConfigProxy) GetServerList

func (cp *ConfigProxy) GetServerList() []constant.ServerConfig

func (*ConfigProxy) ListenConfig

func (cp *ConfigProxy) ListenConfig(params map[string]string, isInitializing bool, accessKey, secretKey string) (string, error)

func (*ConfigProxy) PublishConfigProxy

func (cp *ConfigProxy) PublishConfigProxy(param vo.ConfigParam, tenant, accessKey, secretKey string) (bool, error)

func (*ConfigProxy) SearchConfigHistoryProxy

func (cp *ConfigProxy) SearchConfigHistoryProxy(param vo.SearchHistoryParam, tenant, accessKey, secretKey string) (*model.ConfigPage, error)

func (*ConfigProxy) SearchConfigProxy

func (cp *ConfigProxy) SearchConfigProxy(param vo.SearchConfigParm, tenant, accessKey, secretKey string) (*model.ConfigPage, error)

type IConfigClient

type IConfigClient interface {
	// GetConfig use to get config from nacos server
	// dataId  require
	// group   require
	// tenant ==>nacos.namespace optional
	GetConfig(param vo.ConfigParam) (string, error)

	// PublishConfig use to publish config to nacos server
	// dataId  require
	// group   require
	// content require
	// tenant ==>nacos.namespace optional
	PublishConfig(param vo.ConfigParam) (bool, error)

	// DeleteConfig use to delete config
	// dataId  require
	// group   require
	// tenant ==>nacos.namespace optional
	DeleteConfig(param vo.ConfigParam) (bool, error)

	// ListenConfig use to listen config change,it will callback OnChange() when config change
	// dataId  require
	// group   require
	// onchange require
	// tenant ==>nacos.namespace optional
	ListenConfig(params vo.ConfigParam) (err error)

	//CancelListenConfig use to cancel listen config change
	// dataId  require
	// group   require
	// tenant ==>nacos.namespace optional
	CancelListenConfig(params vo.ConfigParam) (err error)

	// SearchConfig use to search nacos config
	// search  require search=accurate--精确搜索  search=blur--模糊搜索
	// group   option
	// dataId  option
	// tenant ==>nacos.namespace optional
	// pageNo  option,default is 1
	// pageSize option,default is 10
	SearchConfig(param vo.SearchConfigParm) (*model.ConfigPage, error)

	SearchConfigHistory(param vo.SearchHistoryParam) (*model.ConfigPage, error)

	GetConfigHistoryDetailById(id string) (*model.ConfigItem, error)

	GetConfigHistoryPre(id string) (content string, err error)
}

Jump to

Keyboard shortcuts

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