configcenter

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package memberdiscovery created on 2017/6/20.

Index

Constants

View Source
const (
	//HeaderContentType is a variable of type string
	HeaderContentType = "Content-Type"
	//HeaderUserAgent is a variable of type string
	HeaderUserAgent = "User-Agent"
	// Name of the Plugin
	Name = "config_center"
)

Variables

View Source
var (
	ErrAppEmpty       = errors.New("app can not be empty")
	ErrServiceTooLong = errors.New("exceeded max value for service name")
)

errors

View Source
var (
	ErrInvalidEP = errors.New("invalid endpoint")
)

Functions

func GenerateDimension added in v0.8.0

func GenerateDimension(serviceName, version, appName string) (string, error)

func NewConfigCenter

func NewConfigCenter(options config.Options) (config.Client, error)

NewConfigCenter is a function

Types

type ConfigCenter added in v0.8.0

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

ConfigCenter is ConfigCenter Implementation of ConfigCenter

func (*ConfigCenter) DeleteConfigsByKeys added in v0.8.0

func (c *ConfigCenter) DeleteConfigsByKeys(keys []string, labels map[string]string) (map[string]interface{}, error)

DeleteConfigsByKeys

func (*ConfigCenter) Options added in v0.9.0

func (c *ConfigCenter) Options() config.Options

func (*ConfigCenter) PullConfig added in v0.8.0

func (c *ConfigCenter) PullConfig(key, contentType string, labels map[string]string) (interface{}, error)

PullConfig is the implementation of ConfigCenter to pull specific configurations from Config-Server

func (*ConfigCenter) PullConfigs added in v0.8.0

func (c *ConfigCenter) PullConfigs(labels ...map[string]string) (map[string]interface{}, error)

PullConfigs is the implementation of ConfigCenter to pull all the configurations from Config-Server

func (*ConfigCenter) PushConfigs added in v0.8.0

func (c *ConfigCenter) PushConfigs(items map[string]interface{}, labels map[string]string) (map[string]interface{}, error)

PushConfigs push configs to ConfigSource cc , success will return { "Result": "Success" }

func (*ConfigCenter) Watch added in v0.8.0

func (c *ConfigCenter) Watch(f func(map[string]interface{}), errHandler func(err error), labels map[string]string) error

type Instance

type Instance struct {
	Status      string   `json:"status"`
	ServiceName string   `json:"serviceName"`
	IsHTTPS     bool     `json:"isHttps"`
	EntryPoints []string `json:"endpoints"`
}

Instance is a struct

type Members

type Members struct {
	Instances []Instance `json:"instances"`
}

Members is a struct

Jump to

Keyboard shortcuts

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