nacos

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Name = "nacos"
)

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetGroups

func (x *Config) GetGroups() []string

func (*Config) GetNamespace

func (x *Config) GetNamespace() string

func (*Config) GetServerUrl

func (x *Config) GetServerUrl() string

func (*Config) GetServiceRefreshInterval

func (x *Config) GetServiceRefreshInterval() *durationpb.Duration

func (*Config) GetVersion added in v0.4.0

func (x *Config) GetVersion() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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

func (m *Config) ValidateAll() error

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

Jump to

Keyboard shortcuts

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