Documentation
¶
Index ¶
- Constants
- func Init(configPath string) error
- func InitDefault() error
- type AggregationInfo
- type AggregationRegister
- type ConfigFormat
- type ConfigInfo
- type ConfigLanguage
- type ConfiguratorsEtcdInfo
- type GoDepProject
- type GomodProject
- type ItemLogStatus
- type ItemStatus
- type PkgDep
- type ProviderEtcdInfo
- type ProviderInfo
- func (k *ProviderInfo) Enable() string
- func (k *ProviderInfo) Group() string
- func (k *ProviderInfo) ParseValue(bs []byte, isJupApp bool) (err error)
- func (k *ProviderInfo) Region() string
- func (k *ProviderInfo) Value() []byte
- func (k *ProviderInfo) Weight() string
- func (k *ProviderInfo) Zone() string
- type ProviderMetaData
- type RegisterEtcdInfo
- type RegisterKey
- type RegisterKeyInterface
- type RegisterRawMessageEtcdInfo
- type TypeRecord
Constants ¶
View Source
const ( ConfigFormatToml ConfigFormat = "toml" ConfigFormatYaml = "yaml" ConfigFormatJson = "json" ConfigFormatXml = "xml" ConfigFormatProperties = "properties" ConfigFormatIni = "ini" )
View Source
const ( ConfigLanguageGo ConfigLanguage = "go" ConfigLanguageJava = "java" ConfigLanguagePHP = "php" ConfigLanguageLua = "lua" )
View Source
const ( ItemStatusPub ItemStatus = 1 ItemStatusNew = 2 ItemStatusUpdate = 3 ItemStatusDel = 4 )
View Source
const ( ItemLogStatusNew ItemLogStatus = 1 ItemLogStatusUpdate = 2 ItemLogStatusDel = 3 ItemLogStatusPublish = 4 ItemLogStatusRollback = 5 )
View Source
const ( // /wsd-reg/main/providers/grpc://127.0.0.1:18090 ProviderV1GrpcKeyName = "grpc:%s:v1:" ProviderV1HttpKeyName = "http:%s:v1:" ProviderV2GovernKeyName = "/prometheus/job/%s" ProviderV2GrpcKeyName = "/wsd-reg/%s/providers/grpc://" ProviderV2HttpKeyName = "/wsd-reg/%s/providers/http://" ConfiguratorsKeyName = "/wsd-reg/%s/configurators/" ConfiguratorsGrpcKeyName = "/wsd-reg/%s/configurators/grpc:///" ConfiguratorsHttpKeyName = "/wsd-reg/%s/configurators/http:///" )
Variables ¶
This section is empty.
Functions ¶
func InitDefault ¶
func InitDefault() error
Types ¶
type AggregationInfo ¶ added in v0.4.3
type AggregationInfo struct {
Ip string `json:"ip"`
Type string `json:"type"` // govern,grpc,http
Port string `json:"port"`
Address string `json:"address"`
RegKey string `json:"regKey"`
Labels struct {
Enable string `json:"enable"`
Env string `json:"env"`
Group string `json:"group"`
Hostname string `json:"hostname"`
Region string `json:"region"`
UpTimestamp string `json:"startTs"` // 启动时间
VcsInfo string `json:"vcsInfo"`
Weight string `json:"weight"`
Zone string `json:"zone"`
} `json:"labels"`
}
type AggregationRegister ¶ added in v0.4.3
type AggregationRegister struct {
Provider ProviderEtcdInfo `json:"provider"`
Configurators ConfiguratorsEtcdInfo `json:"configurators"`
Aggregation AggregationInfo `json:"aggregation"`
}
type ConfigInfo ¶ added in v0.4.3
type ConfigInfo struct {
RegisterKey
// contains filtered or unexported fields
}
func (*ConfigInfo) Enable ¶ added in v0.4.3
func (k *ConfigInfo) Enable() string
func (*ConfigInfo) Group ¶ added in v0.4.3
func (k *ConfigInfo) Group() string
func (*ConfigInfo) ParseValue ¶ added in v0.4.3
func (k *ConfigInfo) ParseValue(bs []byte) (err error)
func (*ConfigInfo) Value ¶ added in v0.4.3
func (k *ConfigInfo) Value() []byte
func (*ConfigInfo) Weight ¶ added in v0.4.3
func (k *ConfigInfo) Weight() string
type ConfiguratorsEtcdInfo ¶ added in v0.4.3
type ConfiguratorsEtcdInfo struct {
RawValue string `json:"rawValue"` // 检验数据
RegKey string `json:"regKey"`
Type string `json:"type"` // govern,grpc,http
Ip string `json:"ip"`
Port string `json:"port"`
Address string `json:"address"`
Labels struct {
Enable string `json:"enable"`
Env string `json:"env"`
Group string `json:"group"`
Hostname string `json:"hostname"`
Weight string `json:"weight"`
} `json:"labels"`
}
治理的configurators信息
type GoDepProject ¶
type GomodProject ¶
type PkgDep ¶
type PkgDep struct {
Projects []GoDepProject `toml:"projects"`
}
type ProviderEtcdInfo ¶ added in v0.4.3
type ProviderEtcdInfo struct {
RawValue string `json:"rawValue"` // 检验数据
Type string `json:"type"` // govern,grpc,http
Ip string `json:"ip"`
Port string `json:"port"`
Address string `json:"address"`
RegKey string `json:"regKey"`
Enable bool `json:"enable"`
Labels struct {
Enable string `json:"enable"`
Env string `json:"env"`
Group string `json:"group"`
Hostname string `json:"hostname"`
Region string `json:"region"`
UpTimestamp string `json:"startTs"` // 启动时间
VcsInfo string `json:"vcsInfo"`
Weight string `json:"weight"`
Zone string `json:"zone"`
} `json:"labels"`
}
治理的provider信息
func (*ProviderEtcdInfo) ParseToProviderV1 ¶ added in v0.4.3
func (p *ProviderEtcdInfo) ParseToProviderV1(key string) (err error)
grpc:main:v1:lvchao/10.117.22.137:18090
type ProviderInfo ¶ added in v0.4.3
type ProviderInfo struct {
RegisterKey
Meta registerServerMeta // 注册的数据结构
}
func (*ProviderInfo) Enable ¶ added in v0.4.3
func (k *ProviderInfo) Enable() string
func (*ProviderInfo) Group ¶ added in v0.4.3
func (k *ProviderInfo) Group() string
func (*ProviderInfo) ParseValue ¶ added in v0.4.3
func (k *ProviderInfo) ParseValue(bs []byte, isJupApp bool) (err error)
func (*ProviderInfo) Region ¶ added in v0.4.3
func (k *ProviderInfo) Region() string
func (*ProviderInfo) Value ¶ added in v0.4.3
func (k *ProviderInfo) Value() []byte
func (*ProviderInfo) Weight ¶ added in v0.4.3
func (k *ProviderInfo) Weight() string
func (*ProviderInfo) Zone ¶ added in v0.4.3
func (k *ProviderInfo) Zone() string
type ProviderMetaData ¶ added in v0.4.3
type ProviderMetaData struct {
Name string `json:"name"`
AppId string `json:"appId"`
Scheme string `json:"schema"`
Address string `json:"address"`
Weight int `json:"weight"`
Enable bool `json:"enable"`
Healthy bool `json:"healthy"`
Region string `json:"region"`
Zone string `json:"zone"`
Kind int `json:"kind"`
Deployment string `json:"deployment"`
Group string `json:"group"`
Services map[string]registerOneService `json:"services"`
Metadata struct {
AppHost string `json:"appHost"`
AppMode string `json:"appMode"`
AppVersion string `json:"appVersion"`
BuildTime string `json:"buildTime"`
JupiterVersion string `json:"jupiterVersion"`
StartTime string `json:"startTime"`
} `json:"metadata"`
}
type RegisterEtcdInfo ¶ added in v0.4.3
查询etcd里的数据
type RegisterKey ¶ added in v0.4.3
type RegisterKey struct {
// contains filtered or unexported fields
}
注册key
func (RegisterKey) Address ¶ added in v0.4.3
func (k RegisterKey) Address() string
func (RegisterKey) AppName ¶ added in v0.4.3
func (k RegisterKey) AppName() string
func (RegisterKey) IP ¶ added in v0.4.3
func (k RegisterKey) IP() string
func (RegisterKey) Port ¶ added in v0.4.3
func (k RegisterKey) Port() string
func (RegisterKey) Scheme ¶ added in v0.4.3
func (k RegisterKey) Scheme() string
func (RegisterKey) String ¶ added in v0.4.3
func (k RegisterKey) String() string
func (RegisterKey) Type ¶ added in v0.4.3
func (k RegisterKey) Type() TypeRecord
type RegisterKeyInterface ¶ added in v0.4.3
type RegisterKeyInterface interface {
String() string
AppName() string
Type() TypeRecord
Scheme() string
Address() string
}
注册key 包括提供者,消费者,配置等
func NewRegisterKey ¶ added in v0.4.3
func NewRegisterKey(b []byte) (k RegisterKeyInterface, err error)
type RegisterRawMessageEtcdInfo ¶ added in v0.4.3
type RegisterRawMessageEtcdInfo struct {
Key string `json:"key"`
Value json.RawMessage `json:"value"`
}
type TypeRecord ¶ added in v0.4.3
type TypeRecord string
const ( TypeRecordProviders TypeRecord = "providers" TypeRecordConfigurators TypeRecord = "configurators" TypeRecordConsumers TypeRecord = "consumers" TypeRecordRouters TypeRecord = "routers" )
func (TypeRecord) String ¶ added in v0.4.3
func (t TypeRecord) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.