Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetGroups() []string
- func (x *Config) GetNamespace() string
- func (x *Config) GetServerUrl() string
- func (x *Config) GetServiceRefreshInterval() *durationpb.Duration
- func (x *Config) GetVersion() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
- type RegistryType
Constants ¶
const (
Name = "nacos"
)
Variables ¶
var File_types_registries_nacos_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // the version is used to choose the Nacos version between v1 and v2 Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` ServerUrl string `protobuf:"bytes,2,opt,name=server_url,json=serverUrl,proto3" json:"server_url,omitempty"` Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups,omitempty"` // Nacos v1 doesn't provide a method to subscribe the number of services. // So we need to check the services at interval. The interval is default to 30s. // A shorter interval will make the new service take effect earlier but cause more pressure on Nacos server. ServiceRefreshInterval *durationpb.Duration `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetNamespace ¶
func (*Config) GetServerUrl ¶
func (*Config) GetServiceRefreshInterval ¶
func (x *Config) GetServiceRefreshInterval() *durationpb.Duration
func (*Config) GetVersion ¶ added in v0.4.0
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
Validate checks the field values on Config 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 (*Config) ValidateAll ¶
ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found.
type ConfigMultiError ¶
type ConfigMultiError []error
ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.
func (ConfigMultiError) AllErrors ¶
func (m ConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfigMultiError) Error ¶
func (m ConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
type RegistryType ¶
type RegistryType struct { }
func (*RegistryType) Config ¶
func (reg *RegistryType) Config() registry.RegistryConfig