Documentation
¶
Index ¶
- Constants
- Variables
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetConsul() *Consul
- func (x *Conf) GetEtcd() *Etcd
- 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
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 ¶
This section is empty.
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"`
// 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 ¶
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 ¶
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 ¶
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶
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 ¶
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 ¶
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 ¶
func (m ConsulMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConsulMultiError) Error ¶
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 ¶
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 ¶
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 ¶
func (m EtcdMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EtcdMultiError) Error ¶
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.