Documentation
¶
Index ¶
- Constants
- Variables
- func New(c *Conf) (kreg.Registrar, kreg.Discovery)
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetConsul() *Consul
- func (x *Conf) GetEtcd() *Etcd
- func (x *Conf) GetKube() *Kube
- func (x *Conf) GetNacos() *Nacos
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- func (m *Conf) ValidateAll() error
- type ConfMultiError
- type ConfValidationError
- type Consul
- func (*Consul) Descriptor() ([]byte, []int)deprecated
- func (x *Consul) GetAddress() string
- func (x *Consul) GetDialTimeout() *durationpb.Duration
- func (x *Consul) GetEnable() bool
- func (*Consul) ProtoMessage()
- func (x *Consul) ProtoReflect() protoreflect.Message
- func (x *Consul) Reset()
- func (x *Consul) String() string
- func (m *Consul) Validate() error
- func (m *Consul) ValidateAll() error
- type ConsulMultiError
- type ConsulValidationError
- type Etcd
- func (*Etcd) Descriptor() ([]byte, []int)deprecated
- func (x *Etcd) GetDialTimeout() *durationpb.Duration
- func (x *Etcd) GetEnable() bool
- func (x *Etcd) GetEndpoints() []string
- func (*Etcd) ProtoMessage()
- func (x *Etcd) ProtoReflect() protoreflect.Message
- func (x *Etcd) Reset()
- func (x *Etcd) String() string
- func (m *Etcd) Validate() error
- func (m *Etcd) ValidateAll() error
- type EtcdMultiError
- type EtcdValidationError
- type Kube
- type KubeMultiError
- type KubeValidationError
- type Nacos
- func (*Nacos) Descriptor() ([]byte, []int)deprecated
- func (x *Nacos) GetEnable() bool
- func (x *Nacos) GetIpAddr() string
- func (x *Nacos) GetNamespace() string
- func (x *Nacos) GetPort() uint64
- func (*Nacos) ProtoMessage()
- func (x *Nacos) ProtoReflect() protoreflect.Message
- func (x *Nacos) Reset()
- func (x *Nacos) String() string
- func (m *Nacos) Validate() error
- func (m *Nacos) ValidateAll() error
- type NacosMultiError
- type NacosValidationError
Constants ¶
const ( // MetaWeight meta region MetaRegion = "region" // MetaZone meta region MetaZone = "zone" // MetaHostname meta hostname MetaHostname = "hostname" // MetaWeight meta weight MetaWeight = "weight" // MetaOffline meta offline MetaOffline = "offline" // MetaAddrs meta public ip addrs MetaAddrs = "addrs" // MetaIPCount meta ip count MetaIPCount = "ip_count" // MetaConnCount meta conn count MetaConnCount = "conn_count" // PlatformWeb platform web PlatformWeb = "web" )
Variables ¶
var File_registry_conf_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Conf ¶
type Conf struct {
Etcd *Etcd `protobuf:"bytes,1,opt,name=etcd,proto3" json:"etcd,omitempty"`
Consul *Consul `protobuf:"bytes,2,opt,name=consul,proto3" json:"consul,omitempty"`
Kube *Kube `protobuf:"bytes,3,opt,name=kube,proto3" json:"kube,omitempty"`
Nacos *Nacos `protobuf:"bytes,4,opt,name=nacos,proto3" json:"nacos,omitempty"`
// contains filtered or unexported fields
}
func (*Conf) Descriptor
deprecated
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
func (*Conf) Validate ¶
Validate checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Conf) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfMultiError, or nil if none found.
type ConfMultiError ¶ added in v0.0.8
type ConfMultiError []error
ConfMultiError is an error wrapping multiple validation errors returned by Conf.ValidateAll() if the designated constraints aren't met.
func (ConfMultiError) AllErrors ¶ added in v0.0.8
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶ added in v0.0.8
func (m ConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
type Consul ¶
type Consul struct {
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
DialTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=dialTimeout,proto3" json:"dialTimeout,omitempty"`
// contains filtered or unexported fields
}
func (*Consul) Descriptor
deprecated
func (*Consul) GetAddress ¶
func (*Consul) GetDialTimeout ¶
func (x *Consul) GetDialTimeout() *durationpb.Duration
func (*Consul) ProtoMessage ¶
func (*Consul) ProtoMessage()
func (*Consul) ProtoReflect ¶
func (x *Consul) ProtoReflect() protoreflect.Message
func (*Consul) Validate ¶
Validate checks the field values on Consul with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Consul) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on Consul with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConsulMultiError, or nil if none found.
type ConsulMultiError ¶ added in v0.0.8
type ConsulMultiError []error
ConsulMultiError is an error wrapping multiple validation errors returned by Consul.ValidateAll() if the designated constraints aren't met.
func (ConsulMultiError) AllErrors ¶ added in v0.0.8
func (m ConsulMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConsulMultiError) Error ¶ added in v0.0.8
func (m ConsulMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConsulValidationError ¶
type ConsulValidationError struct {
// contains filtered or unexported fields
}
ConsulValidationError is the validation error returned by Consul.Validate if the designated constraints aren't met.
func (ConsulValidationError) Cause ¶
func (e ConsulValidationError) Cause() error
Cause function returns cause value.
func (ConsulValidationError) Error ¶
func (e ConsulValidationError) Error() string
Error satisfies the builtin error interface
func (ConsulValidationError) ErrorName ¶
func (e ConsulValidationError) ErrorName() string
ErrorName returns error name.
func (ConsulValidationError) Field ¶
func (e ConsulValidationError) Field() string
Field function returns field value.
func (ConsulValidationError) Key ¶
func (e ConsulValidationError) Key() bool
Key function returns key value.
func (ConsulValidationError) Reason ¶
func (e ConsulValidationError) Reason() string
Reason function returns reason value.
type Etcd ¶
type Etcd struct {
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
Endpoints []string `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
DialTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=dialTimeout,proto3" json:"dialTimeout,omitempty"`
// contains filtered or unexported fields
}
func (*Etcd) Descriptor
deprecated
func (*Etcd) GetDialTimeout ¶
func (x *Etcd) GetDialTimeout() *durationpb.Duration
func (*Etcd) GetEndpoints ¶
func (*Etcd) ProtoMessage ¶
func (*Etcd) ProtoMessage()
func (*Etcd) ProtoReflect ¶
func (x *Etcd) ProtoReflect() protoreflect.Message
func (*Etcd) Validate ¶
Validate checks the field values on Etcd with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Etcd) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on Etcd with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EtcdMultiError, or nil if none found.
type EtcdMultiError ¶ added in v0.0.8
type EtcdMultiError []error
EtcdMultiError is an error wrapping multiple validation errors returned by Etcd.ValidateAll() if the designated constraints aren't met.
func (EtcdMultiError) AllErrors ¶ added in v0.0.8
func (m EtcdMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EtcdMultiError) Error ¶ added in v0.0.8
func (m EtcdMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EtcdValidationError ¶
type EtcdValidationError struct {
// contains filtered or unexported fields
}
EtcdValidationError is the validation error returned by Etcd.Validate if the designated constraints aren't met.
func (EtcdValidationError) Cause ¶
func (e EtcdValidationError) Cause() error
Cause function returns cause value.
func (EtcdValidationError) Error ¶
func (e EtcdValidationError) Error() string
Error satisfies the builtin error interface
func (EtcdValidationError) ErrorName ¶
func (e EtcdValidationError) ErrorName() string
ErrorName returns error name.
func (EtcdValidationError) Field ¶
func (e EtcdValidationError) Field() string
Field function returns field value.
func (EtcdValidationError) Key ¶
func (e EtcdValidationError) Key() bool
Key function returns key value.
func (EtcdValidationError) Reason ¶
func (e EtcdValidationError) Reason() string
Reason function returns reason value.
type Kube ¶
type Kube struct {
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
// contains filtered or unexported fields
}
func (*Kube) Descriptor
deprecated
func (*Kube) ProtoMessage ¶
func (*Kube) ProtoMessage()
func (*Kube) ProtoReflect ¶
func (x *Kube) ProtoReflect() protoreflect.Message
func (*Kube) Validate ¶
Validate checks the field values on Kube with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Kube) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on Kube with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in KubeMultiError, or nil if none found.
type KubeMultiError ¶ added in v0.0.8
type KubeMultiError []error
KubeMultiError is an error wrapping multiple validation errors returned by Kube.ValidateAll() if the designated constraints aren't met.
func (KubeMultiError) AllErrors ¶ added in v0.0.8
func (m KubeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (KubeMultiError) Error ¶ added in v0.0.8
func (m KubeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type KubeValidationError ¶
type KubeValidationError struct {
// contains filtered or unexported fields
}
KubeValidationError is the validation error returned by Kube.Validate if the designated constraints aren't met.
func (KubeValidationError) Cause ¶
func (e KubeValidationError) Cause() error
Cause function returns cause value.
func (KubeValidationError) Error ¶
func (e KubeValidationError) Error() string
Error satisfies the builtin error interface
func (KubeValidationError) ErrorName ¶
func (e KubeValidationError) ErrorName() string
ErrorName returns error name.
func (KubeValidationError) Field ¶
func (e KubeValidationError) Field() string
Field function returns field value.
func (KubeValidationError) Key ¶
func (e KubeValidationError) Key() bool
Key function returns key value.
func (KubeValidationError) Reason ¶
func (e KubeValidationError) Reason() string
Reason function returns reason value.
type Nacos ¶ added in v0.0.8
type Nacos struct {
Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
IpAddr string `protobuf:"bytes,2,opt,name=ipAddr,proto3" json:"ipAddr,omitempty"`
Port uint64 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
// contains filtered or unexported fields
}
func (*Nacos) Descriptor
deprecated
added in
v0.0.8
func (*Nacos) GetNamespace ¶ added in v0.0.8
func (*Nacos) ProtoMessage ¶ added in v0.0.8
func (*Nacos) ProtoMessage()
func (*Nacos) ProtoReflect ¶ added in v0.0.8
func (x *Nacos) ProtoReflect() protoreflect.Message
func (*Nacos) Validate ¶ added in v0.0.8
Validate checks the field values on Nacos with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Nacos) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on Nacos with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in NacosMultiError, or nil if none found.
type NacosMultiError ¶ added in v0.0.8
type NacosMultiError []error
NacosMultiError is an error wrapping multiple validation errors returned by Nacos.ValidateAll() if the designated constraints aren't met.
func (NacosMultiError) AllErrors ¶ added in v0.0.8
func (m NacosMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (NacosMultiError) Error ¶ added in v0.0.8
func (m NacosMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type NacosValidationError ¶ added in v0.0.8
type NacosValidationError struct {
// contains filtered or unexported fields
}
NacosValidationError is the validation error returned by Nacos.Validate if the designated constraints aren't met.
func (NacosValidationError) Cause ¶ added in v0.0.8
func (e NacosValidationError) Cause() error
Cause function returns cause value.
func (NacosValidationError) Error ¶ added in v0.0.8
func (e NacosValidationError) Error() string
Error satisfies the builtin error interface
func (NacosValidationError) ErrorName ¶ added in v0.0.8
func (e NacosValidationError) ErrorName() string
ErrorName returns error name.
func (NacosValidationError) Field ¶ added in v0.0.8
func (e NacosValidationError) Field() string
Field function returns field value.
func (NacosValidationError) Key ¶ added in v0.0.8
func (e NacosValidationError) Key() bool
Key function returns key value.
func (NacosValidationError) Reason ¶ added in v0.0.8
func (e NacosValidationError) Reason() string
Reason function returns reason value.