dubbo.apache.org/dubbo-go/v3@v3.1.1/common/constant/key.go (about) 1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package constant 19 20 type DubboCtxKey string 21 22 const ( 23 AsyncKey = "async" // it's value should be "true" or "false" of string type 24 ) 25 26 const ( 27 ClientNameKey = "remote-client-name" 28 ) 29 30 const ( 31 GroupKey = "group" 32 VersionKey = "version" 33 InterfaceKey = "interface" 34 MessageSizeKey = "message_size" 35 PathKey = "path" 36 ServiceKey = "service" 37 MethodsKey = "methods" 38 TimeoutKey = "timeout" 39 CategoryKey = "category" 40 CheckKey = "check" 41 EnabledKey = "enabled" 42 SideKey = "side" 43 OverrideProvidersKey = "providerAddresses" 44 BeanNameKey = "bean.name" 45 GenericKey = "generic" 46 ClassifierKey = "classifier" 47 TokenKey = "token" 48 LocalAddr = "local-addr" 49 RemoteAddr = "remote-addr" 50 DefaultRemotingTimeout = 3000 51 ReleaseKey = "release" 52 AnyhostKey = "anyhost" 53 PortKey = "port" 54 ProtocolKey = "protocol" 55 PathSeparator = "/" 56 DotSeparator = "." 57 CommaSeparator = "," 58 SslEnabledKey = "ssl-enabled" 59 ParamsTypeKey = "parameter-type-names" // key used in pass through invoker factory, to define param type 60 MetadataTypeKey = "metadata-type" 61 MaxCallSendMsgSize = "max-call-send-msg-size" 62 MaxServerSendMsgSize = "max-server-send-msg-size" 63 MaxCallRecvMsgSize = "max-call-recv-msg-size" 64 MaxServerRecvMsgSize = "max-server-recv-msg-size" 65 ) 66 67 // tls constant 68 const ( 69 TLSKey = "tls_key" 70 TLSCert = "tls_cert" 71 CACert = "ca_cert" 72 TLSServerNAME = "tls_server_name" 73 ) 74 75 const ( 76 ServiceFilterKey = "service.filter" 77 ReferenceFilterKey = "reference.filter" 78 ) 79 80 // Filter Keys 81 const ( 82 AccessLogFilterKey = "accesslog" 83 ActiveFilterKey = "active" 84 AdaptiveServiceProviderFilterKey = "padasvc" 85 AuthConsumerFilterKey = "sign" 86 AuthProviderFilterKey = "auth" 87 EchoFilterKey = "echo" 88 ExecuteLimitFilterKey = "execute" 89 GenericFilterKey = "generic" 90 GenericServiceFilterKey = "generic_service" 91 GracefulShutdownProviderFilterKey = "pshutdown" 92 GracefulShutdownConsumerFilterKey = "cshutdown" 93 GracefulShutdownFilterShutdownConfig = "GracefulShutdownFilterShutdownConfig" 94 HystrixConsumerFilterKey = "hystrix_consumer" 95 HystrixProviderFilterKey = "hystrix_provider" 96 MetricsFilterKey = "metrics" 97 SeataFilterKey = "seata" 98 SentinelProviderFilterKey = "sentinel-provider" 99 SentinelConsumerFilterKey = "sentinel-consumer" 100 TokenFilterKey = "token" 101 TpsLimitFilterKey = "tps" 102 TracingFilterKey = "tracing" 103 XdsCircuitBreakerKey = "xds_circuit_reaker" 104 OTELServerTraceKey = "otelServerTrace" 105 OTELClientTraceKey = "otelClientTrace" 106 ) 107 108 const ( 109 TimestampKey = "timestamp" 110 RemoteTimestampKey = "remote.timestamp" 111 ClusterKey = "cluster" 112 LoadbalanceKey = "loadbalance" 113 WeightKey = "weight" 114 WarmupKey = "warmup" 115 RetriesKey = "retries" 116 StickyKey = "sticky" 117 BeanName = "bean.name" 118 FailBackTasksKey = "failbacktasks" 119 ForksKey = "forks" 120 DefaultForks = 2 121 DefaultTimeout = 1000 122 TPSLimiterKey = "tps.limiter" 123 TPSRejectedExecutionHandlerKey = "tps.limit.rejected.handler" 124 TPSLimitRateKey = "tps.limit.rate" 125 DefaultTPSLimitRate = -1 126 TPSLimitIntervalKey = "tps.limit.interval" 127 DefaultTPSLimitInterval = -1 128 TPSLimitStrategyKey = "tps.limit.strategy" 129 ExecuteLimitKey = "execute.limit" 130 DefaultExecuteLimit = "-1" 131 ExecuteRejectedExecutionHandlerKey = "execute.limit.rejected.handler" 132 SerializationKey = "serialization" 133 PIDKey = "pid" 134 SyncReportKey = "sync.report" 135 RetryPeriodKey = "retry.period" 136 RetryTimesKey = "retry.times" 137 CycleReportKey = "cycle.report" 138 DefaultBlackListRecoverBlock = 16 139 ) 140 141 const ( 142 DubboGoCtxKey = DubboCtxKey("dubbogo-ctx") 143 ) 144 145 // metadata report keys 146 const ( 147 MetadataReportNamespaceKey = "metadata-report.namespace" 148 MetadataReportGroupKey = "metadata-report.group" 149 MetadataReportUsernameKey = "metadata-report.username" 150 MetadataReportPasswordKey = "metadata-report.password" 151 MetadataReportProtocolKey = "metadata-report.protocol" 152 ) 153 154 // registry keys 155 const ( 156 RegistryKey = "registry" 157 RegistryProtocol = "registry" 158 ServiceRegistryProtocol = "service-discovery-registry" 159 RegistryRoleKey = "registry.role" 160 RegistryDefaultKey = "registry.default" 161 RegistryAccessKey = "registry.accesskey" 162 RegistrySecretKey = "registry.secretkey" 163 RegistryTimeoutKey = "registry.timeout" 164 RegistryLabelKey = "label" 165 PreferredKey = "preferred" 166 RegistryZoneKey = "zone" 167 RegistryZoneForceKey = "zone.force" 168 RegistryTTLKey = "registry.ttl" 169 RegistrySimplifiedKey = "simplified" 170 RegistryNamespaceKey = "registry.namespace" 171 RegistryGroupKey = "registry.group" 172 RegistryTypeInterface = "interface" 173 RegistryTypeService = "service" 174 RegistryTypeAll = "all" 175 ) 176 177 const ( 178 ApplicationKey = "application" 179 OrganizationKey = "organization" 180 NameKey = "name" 181 ModuleKey = "module" 182 AppVersionKey = "app.version" 183 OwnerKey = "owner" 184 EnvironmentKey = "environment" 185 MethodKey = "method" 186 MethodKeys = "methods" 187 RuleKey = "rule" 188 RuntimeKey = "runtime" 189 BackupKey = "backup" 190 RoutersCategory = "routers" 191 RouteProtocol = "route" 192 ConditionRouteProtocol = "condition" 193 TagRouteProtocol = "tag" 194 ProvidersCategory = "providers" 195 RouterKey = "router" 196 ExportKey = "export" 197 ) 198 199 // config center keys 200 const ( 201 ConfigNamespaceKey = "config-center.namespace" 202 ConfigGroupKey = "config-center.group" 203 ConfigAppIDKey = "config-center.appId" 204 ConfigClusterKey = "config-center.cluster" 205 ConfigTimeoutKey = "config-center.timeout" 206 ConfigUsernameKey = "config-center.username" 207 ConfigAccessKey = "config-center.access" 208 ConfigPasswordKey = "config-center.password" 209 ConfigLogDirKey = "config-center.logDir" 210 ConfigVersionKey = "config-center.configVersion" 211 CompatibleConfigKey = "config-center.compatible_config" 212 ConfigSecretKey = "config-center.secret" 213 ConfigBackupConfigKey = "config-center.isBackupConfig" 214 ConfigBackupConfigPathKey = "config-center.backupConfigPath" 215 ) 216 217 const ( 218 RegistryConfigPrefix = "dubbo.registries" 219 ApplicationConfigPrefix = "dubbo.application" 220 ConfigCenterPrefix = "dubbo.config-center" 221 SingleRegistryConfigPrefix = "dubbo.registry" 222 ReferenceConfigPrefix = "dubbo.reference" 223 ServiceConfigPrefix = "dubbo.service" 224 ConfigBasePrefix = "dubbo.base" 225 RemotePrefix = "dubbo.remote" 226 ServiceDiscPrefix = "dubbo.service-discovery" 227 ProtocolConfigPrefix = "dubbo.protocols" 228 ProviderConfigPrefix = "dubbo.provider" 229 ConsumerConfigPrefix = "dubbo.consumer" 230 ShutdownConfigPrefix = "dubbo.shutdown" 231 MetadataReportPrefix = "dubbo.metadata-report" 232 RouterConfigPrefix = "dubbo.router" 233 TracingConfigPrefix = "dubbo.tracing" 234 LoggerConfigPrefix = "dubbo.logger" 235 CustomConfigPrefix = "dubbo.custom" 236 ProfilesConfigPrefix = "dubbo.profiles" 237 TLSConfigPrefix = "dubbo.tls_config" 238 ) 239 240 const ( 241 ConfiguratorSuffix = ".configurators" 242 ) 243 244 const ( 245 NacosKey = "nacos" 246 NacosGroupKey = "nacos.group" 247 NacosDefaultRoleType = 3 248 NacosCacheDirKey = "nacos.cacheDir" 249 NacosLogDirKey = "nacos.logDir" 250 NacosBeatIntervalKey = "nacos.beatInterval" 251 NacosEndpoint = "endpoint" 252 NacosServiceNameSeparator = ":" 253 NacosCategoryKey = "nacos.category" 254 NacosProtocolKey = "protocol" 255 NacosPathKey = "path" 256 NacosNamespaceID = "nacos.namespaceId" 257 NacosNotLoadLocalCache = "nacos.not.load.cache" 258 NacosAppNameKey = "appName" 259 NacosRegionIDKey = "nacos.regionId" 260 NacosAccessKey = "nacos.access" 261 NacosSecretKey = "nacos.secret" 262 NacosOpenKmsKey = "kms" 263 NacosUpdateThreadNumKey = "updateThreadNum" 264 NacosLogLevelKey = "nacos.logLevel" 265 NacosUsername = "nacos.username" 266 NacosPassword = "nacos.password" 267 NacosTimeout = "nacos.timeout" 268 NacosUpdateCacheWhenEmpty = "nacos.updateCacheWhenEmpty" 269 ) 270 271 const ( 272 FileKey = "file" 273 ) 274 275 const ( 276 ZookeeperKey = "zookeeper" 277 ) 278 279 const ( 280 XDSRegistryKey = "xds" 281 ) 282 283 const ( 284 EtcdV3Key = "etcdv3" 285 ) 286 287 const ( 288 // PassThroughProxyFactoryKey is key of proxy factory with raw data input service 289 PassThroughProxyFactoryKey = "dubbo-raw" 290 ) 291 292 const ( 293 TracingRemoteSpanCtx = DubboCtxKey("tracing.remote.span.ctx") 294 TracingConfigKey = "config.tracing" 295 ) 296 297 // Use for router module 298 const ( 299 TagRouterRuleSuffix = ".tag-router" 300 ConditionRouterRuleSuffix = ".condition-router" // Specify condition router suffix 301 MeshRouteSuffix = ".MESHAPPRULE" // Specify mesh router suffix 302 ForceUseTag = "dubbo.force.tag" // the tag in attachment 303 ForceUseCondition = "dubbo.force.condition" 304 Tagkey = "dubbo.tag" // key of tag 305 ConditionKey = "dubbo.condition" 306 AttachmentKey = DubboCtxKey("attachment") // key in context in invoker 307 TagRouterFactoryKey = "tag" 308 ConditionAppRouterFactoryKey = "provider.condition" 309 ConditionServiceRouterFactoryKey = "service.condition" 310 ForceKey = "force" 311 Arguments = "arguments" 312 Attachments = "attachments" 313 Param = "param" 314 Scope = "scope" 315 Wildcard = "wildcard" 316 MeshRouterFactoryKey = "mesh" 317 ) 318 319 // Auth filter 320 const ( 321 ServiceAuthKey = "auth" // name of service filter 322 AuthenticatorKey = "authenticator" // key of authenticator 323 DefaultAuthenticator = "accesskeys" // name of default authenticator 324 DefaultAccessKeyStorage = "urlstorage" // name of default url storage 325 AccessKeyStorageKey = "accessKey.storage" // key of storage 326 RequestTimestampKey = "timestamp" // key of request timestamp 327 RequestSignatureKey = "signature" // key of request signature 328 AKKey = "ak" // AK key 329 SignatureStringFormat = "%s#%s#%s#%s" // signature format 330 ParameterSignatureEnableKey = "param.sign" // key whether enable signature 331 Consumer = "consumer" // consumer 332 AccessKeyIDKey = ".accessKeyId" // key of access key id 333 SecretAccessKeyKey = ".secretAccessKey" // key of secret access key 334 ) 335 336 // metadata report 337 338 const ( 339 MetaConfigRemote = "remote" 340 MetaConfigLocal = "local" 341 KeySeparator = ":" 342 DefaultPathTag = "metadata" 343 KeyRevisionPrefix = "revision" 344 MetadataServiceName = "org.apache.dubbo.metadata.MetadataService" // metadata service 345 ) 346 347 // service discovery 348 const ( 349 SubscribedServiceNamesKey = "subscribed-services" 350 ProvidedBy = "provided-by" 351 ExportedServicesRevisionPropertyName = "dubbo.metadata.revision" 352 SubscribedServicesRevisionPropertyName = "dubbo.subscribed-services.revision" 353 ServiceInstanceSelector = "service-instance-selector" 354 MetadataStorageTypePropertyName = "dubbo.metadata.storage-type" 355 DefaultMetadataStorageType = "local" 356 RemoteMetadataStorageType = "remote" 357 ServiceInstanceEndpoints = "dubbo.endpoints" 358 MetadataServicePrefix = "dubbo.metadata-service." 359 MetadataServiceURLParamsPropertyName = MetadataServicePrefix + "url-params" 360 MetadataServiceURLsPropertyName = MetadataServicePrefix + "urls" 361 ServiceDiscoveryKey = "service_discovery" // indicate which service discovery instance will be used 362 ) 363 364 // Generic Filter 365 const ( 366 GenericSerializationDefault = "true" 367 GenericSerializationGson = "gson" 368 ) 369 370 // AdaptiveService Filter 371 // goland:noinspection ALL 372 const ( 373 AdaptiveServiceUpdaterKey = "adaptive-service.updater" 374 AdaptiveServiceRemainingKey = "adaptive-service.remaining" 375 AdaptiveServiceInflightKey = "adaptive-service.inflight" 376 AdaptiveServiceEnabledKey = "adaptive-service.enabled" 377 AdaptiveServiceIsEnabled = "1" 378 ) 379 380 // reflection service 381 const ( 382 ReflectionServiceTypeName = "DubbogoServerReflectionServer" 383 ReflectionServiceInterface = "grpc.reflection.v1alpha.ServerReflection" 384 ) 385 386 // healthcheck service 387 const ( 388 HealthCheckServiceTypeName = "DubbogoHealthServer" 389 HealthCheckServiceInterface = "grpc.health.v1.Health" 390 ) 391 392 const ( 393 LoggerLevelKey = "logger.level" 394 LoggerDriverKey = "logger.driver" 395 LoggerFormatKey = "logger.format" 396 LoggerAppenderKey = "logger.appender" 397 LoggerFileNameKey = "logger.file.name" 398 LoggerFileNaxSizeKey = "logger.file.max-size" 399 LoggerFileMaxBackupsKey = "logger.file.max-backups" 400 LoggerFileMaxAgeKey = "logger.file.max-age" 401 LoggerFileLocalTimeKey = "logger.file.local-time" 402 LoggerFileCompressKey = "logger.file.compress" 403 ) 404 405 // metrics key 406 const ( 407 MetadataEnabledKey = "metrics.metadata.enabled" 408 RegistryEnabledKey = "metrics.registry.enabled" 409 ConfigCenterEnabledKey = "metrics.config-center.enabled" 410 RpcEnabledKey = "metrics.rpc.enabled" 411 AggregationEnabledKey = "aggregation.enabled" 412 AggregationBucketNumKey = "aggregation.bucket.num" 413 AggregationTimeWindowSecondsKey = "aggregation.time.window.seconds" 414 HistogramEnabledKey = "histogram.enabled" 415 PrometheusExporterEnabledKey = "prometheus.exporter.enabled" 416 PrometheusExporterMetricsPortKey = "prometheus.exporter.metrics.port" 417 PrometheusExporterMetricsPathKey = "prometheus.exporter.metrics.path" 418 PrometheusPushgatewayEnabledKey = "prometheus.pushgateway.enabled" 419 PrometheusPushgatewayBaseUrlKey = "prometheus.pushgateway.base.url" 420 PrometheusPushgatewayUsernameKey = "prometheus.pushgateway.username" 421 PrometheusPushgatewayPasswordKey = "prometheus.pushgateway.password" 422 PrometheusPushgatewayPushIntervalKey = "prometheus.pushgateway.push.interval" 423 PrometheusPushgatewayJobKey = "prometheus.pushgateway.job" 424 ) 425 426 // default meta cache config 427 const ( 428 DefaultMetaCacheName = "dubbo.meta" 429 DefaultMetaFileName = "dubbo.metadata." 430 DefaultEntrySize = 100 431 )