constants

package
v0.0.0-...-d9ebf33 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathSeparator      = "/"
	DotSeparator       = "."
	ColonSeparator     = ":"
	CommaSeparator     = ","
	InterrogationPoint = "?"
	IP                 = "ip"
	PlusSigns          = "+"
	PunctuationPoint   = "."
	WildcardCharacter  = "*"
)
View Source
const (
	DubboPropertyKey         = "dubbo.properties"
	RegistryAddressKey       = "dubbo.registry.address"
	MetadataReportAddressKey = "dubbo.metadata-report.address"
)
View Source
const (
	RegistryKey                  = "registry"
	RegistryClusterKey           = "REGISTRY_CLUSTER"
	RegisterModeKey              = "register-mode"
	RegistryClusterTypeKey       = "registry-cluster-type"
	RemoteClientNameKey          = "remote-client-name"
	DefaultRegisterModeInterface = "interface"
	DefaultRegisterModeInstance  = "instance"
	DefaultRegisterModeAll       = "all"
	MetadataStorageTypeKey       = "dubbo.metadata.storage-type"
	TimestampKey                 = "timestamp"
	EndpointsKey                 = "dubbo.endpoints"
	URLParamsKey                 = "dubbo.metadata-service.url-params"
	MetadataRevisionKey          = "dubbo.metadata.revision"
	AnyValue                     = "*"
	AnyHostValue                 = "0.0.0.0"
	InterfaceKey                 = "interface"
	GroupKey                     = "group"
	VersionKey                   = "version"
	ClassifierKey                = "classifier"
	CategoryKey                  = "category"
	ProvidersCategory            = "providers"
	ConsumersCategory            = "consumers"
	RoutersCategory              = "routers"
	EnabledKey                   = "enabled"
	CheckKey                     = "check"
	AdminProtocol                = "admin"
	Side                         = "side"
	ConsumerSide                 = "consumer"
	ProviderSide                 = "provider"
	ConsumerProtocol             = "consumer"
	EmptyProtocol                = "empty"
	OverrideProtocol             = "override"
	DefaultGroup                 = "dubbo"
	DynamicKey                   = "dynamic"
	SerializationKey             = "serialization"
	PreferSerializationKey       = "prefer.serialization"
	TimeoutKey                   = "timeout"
	WeightKey                    = "weight"
	BalancingKey                 = "balancing"
	OwnerKey                     = "owner"

	ConfigFileEnvKey  = "conf" // config file path
	RegistryAll       = "ALL"
	RegistryInterface = "INTERFACE"
	RegistryInstance  = "INSTANCE"
	RegistryType      = "TYPE"
	NamespaceKey      = "namespace"
)
View Source
const (
	Application = "application"
	Instance    = "instance"
	Service     = "service"

	StatefulSet = "StatefulSet"
	Deployment  = "Deployment"
)
View Source
const (
	ProtocolKey     = "protocol"
	DubboVersionKey = "dubbo"
	WorkLoadKey     = "workLoad"
	ReleaseKey      = "release"
)
View Source
const (
	Stateful  = "有状态"
	Stateless = "无状态"
)
View Source
const (
	// DefaultLockTimeout is the default timeout for distributed lock operations
	// This timeout applies to lock acquisition, renewal, and release operations
	DefaultLockTimeout = 30 * time.Second

	// DefaultAutoRenewThreshold is the TTL threshold above which auto-renewal is enabled
	// Locks with TTL longer than this value will be automatically renewed
	DefaultAutoRenewThreshold = 10 * time.Second

	// DefaultUnlockTimeout is the timeout for unlock operations in deferred cleanup
	DefaultUnlockTimeout = 5 * time.Second

	// DefaultRenewTimeout is the timeout for lock renewal operations
	DefaultRenewTimeout = 5 * time.Second

	// DefaultLockRetryInterval is the interval between lock acquisition retry attempts
	DefaultLockRetryInterval = 100 * time.Millisecond

	// DefaultCleanupInterval is the interval for periodic expired lock cleanup
	DefaultCleanupInterval = 5 * time.Minute

	// DefaultCleanupTimeout is the timeout for cleanup operations
	DefaultCleanupTimeout = 30 * time.Second
)
View Source
const (
	// TagRouteKeyPrefix is the prefix for tag route lock keys
	TagRouteKeyPrefix = "tag_route"

	// ConfiguratorRuleKeyPrefix is the prefix for configurator rule lock keys
	ConfiguratorRuleKeyPrefix = "configurator_rule"

	// ConditionRuleKeyPrefix is the prefix for condition rule lock keys
	ConditionRuleKeyPrefix = "condition_rule"
)

Lock key prefixes for different resource types

View Source
const (
	NacosConfigGroup  = "dubbo"
	NacosMappingGroup = "mapping"
)
View Source
const (
	ConfiguratorVersionV3   = `v3.0`
	ConfiguratorVersionV3x1 = `v3.1`
	ConfigVersionKey        = `configVersion`
	ScopeApplication        = `application`
	ScopeService            = `service`
	SideProvider            = `provider`
	SideConsumer            = `consumer`

	ConfiguratorRuleDotSuffix = ".configurators"
	ConfiguratorsSuffix       = "configurators"
	ConditionRuleDotSuffix    = ".condition-router"
	ConditionRuleSuffix       = "condition-router"
	TagRuleDotSuffix          = ".tag-router"
	TagRuleSuffix             = "tag-router"
	AffinityRuleDotSuffix     = ".affinity-router"
	AffinityRuleSuffix        = "affinity-router"
)
View Source
const (
	NotEqual = "!="
	Equal    = "="
)
View Source
const (
	ServiceDefaultTimeout int32 = 1000
	DefaultWeight         int32 = 100
	ServiceDefaultRetries int32 = 2
)
View Source
const (
	DefaultMesh = "default"
)

ServiceProviderNacosKey blur search service provider metadata "*:provider:*"

View Source
const (
	TimeFormatStr = "2006-01-02 15:04:05"
)

Variables

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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