Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClusterKeyAvailable = "available" ClusterKeyBroadcast = "broadcast" ClusterKeyFailback = "failback" ClusterKeyFailfast = "failfast" ClusterKeyFailover = "failover" ClusterKeyFailsafe = "failsafe" ClusterKeyForking = "forking" ClusterKeyZoneAware = "zoneAware" ClusterKeyAdaptiveService = "adaptiveService" )
View Source
const ( Dubbo = "dubbo" ProviderProtocol = "provider" OverrideProtocol = "override" //compatible with 2.6.x EmptyProtocol = "empty" RouterProtocol = "router" )
View Source
const ( DefaultWeight = 100 DefaultWarmup = 10 * 60 // in java here is 10*60*1000 because of System.currentTimeMillis() is measured in milliseconds & in go time.Unix() is second DefaultLoadBalance = "random" DefaultRetries = "2" DefaultRetriesInt = 2 DefaultProtocol = "dubbo" DefaultRegTimeout = "5s" DefaultRegTTL = "15m" DefaultCluster = "failover" DefaultFailbackTimes = "3" DefaultFailbackTimesInt = 3 DefaultFailbackTasks = 100 DefaultRestClient = "resty" DefaultRestServer = "go-restful" DefaultPort = 20000 )
View Source
const ( DefaultKey = "default" Generic = "$invoke" GenericAsync = "$invokeAsync" Echo = "$echo" )
View Source
const ( // DefaultServiceFilters defines default service filters, it is highly recommended // that put the AdaptiveServiceProviderFilterKey at the end. DefaultServiceFilters = EchoFilterKey + "," + MetricsFilterKey + "," + TokenFilterKey + "," + AccessLogFilterKey + "," + TpsLimitFilterKey + "," + GenericServiceFilterKey + "," + ExecuteLimitFilterKey + "," + GracefulShutdownProviderFilterKey DefaultReferenceFilters = GracefulShutdownConsumerFilterKey )
default filters
View Source
const ( AnyValue = "*" AnyHostValue = "0.0.0.0" LocalHostValue = "192.168.1.1" RemoveValuePrefix = "-" )
View Source
const ( ConfiguratorsCategory = "configurators" RouterCategory = "category" DefaultCategory = ProviderCategory DynamicConfiguratorsCategory = "dynamicconfigurators" AppDynamicConfiguratorsCategory = "appdynamicconfigurators" ProviderCategory = "providers" ConsumerCategory = "consumers" )
View Source
const ( SimpleMetadataServiceName = "MetadataService" DefaultRevision = "N/A" )
View Source
const ( ConfigFileEnvKey = "DUBBO_GO_CONFIG_PATH" // key of environment variable dubbogo configure file path AppLogConfFile = "AppLogConfFile" )
nolint
View Source
const ( GroupKey = "group" VersionKey = "version" InterfaceKey = "interface" MessageSizeKey = "message_size" PathKey = "path" ServiceKey = "service" MethodsKey = "methods" TimeoutKey = "timeout" CategoryKey = "category" CheckKey = "check" EnabledKey = "enabled" SideKey = "side" OverrideProvidersKey = "providerAddresses" BeanNameKey = "bean.name" GenericKey = "generic" ClassifierKey = "classifier" TokenKey = "token" LocalAddr = "local-addr" RemoteAddr = "remote-addr" DefaultRemotingTimeout = 3000 ReleaseKey = "release" AnyhostKey = "anyhost" PortKey = "port" ProtocolKey = "protocol" PathSeparator = "/" DotSeparator = "." CommaSeparator = "," SslEnabledKey = "ssl-enabled" ParamsTypeKey = "parameter-type-names" // key used in pass through invoker factory, to define param type MetadataTypeKey = "metadata-type" MaxCallSendMsgSize = "max-call-send-msg-size" MaxServerSendMsgSize = "max-server-send-msg-size" MaxCallRecvMsgSize = "max-call-recv-msg-size" MaxServerRecvMsgSize = "max-server-recv-msg-size" )
View Source
const ( ServiceFilterKey = "service.filter" ReferenceFilterKey = "reference.filter" )
View Source
const ( AccessLogFilterKey = "accesslog" ActiveFilterKey = "active" AdaptiveServiceProviderFilterKey = "padasvc" AuthConsumerFilterKey = "sign" AuthProviderFilterKey = "auth" EchoFilterKey = "echo" ExecuteLimitFilterKey = "execute" GenericFilterKey = "generic" GenericServiceFilterKey = "generic_service" GracefulShutdownProviderFilterKey = "pshutdown" GracefulShutdownConsumerFilterKey = "cshutdown" GracefulShutdownFilterShutdownConfig = "GracefulShutdownFilterShutdownConfig" HystrixConsumerFilterKey = "hystrix_consumer" HystrixProviderFilterKey = "hystrix_provider" MetricsFilterKey = "metrics" SeataFilterKey = "seata" SentinelProviderFilterKey = "sentinel-provider" SentinelConsumerFilterKey = "sentinel-consumer" TokenFilterKey = "token" TpsLimitFilterKey = "tps" TracingFilterKey = "tracing" )
Filter Keys
View Source
const ( TimestampKey = "timestamp" RemoteTimestampKey = "remote.timestamp" ClusterKey = "cluster" LoadbalanceKey = "loadbalance" WeightKey = "weight" WarmupKey = "warmup" RetriesKey = "retries" StickyKey = "sticky" BeanName = "bean.name" FailBackTasksKey = "failbacktasks" ForksKey = "forks" DefaultForks = 2 DefaultTimeout = 1000 TPSLimiterKey = "tps.limiter" TPSRejectedExecutionHandlerKey = "tps.limit.rejected.handler" TPSLimitRateKey = "tps.limit.rate" DefaultTPSLimitRate = -1 TPSLimitIntervalKey = "tps.limit.interval" DefaultTPSLimitInterval = -1 TPSLimitStrategyKey = "tps.limit.strategy" ExecuteLimitKey = "execute.limit" DefaultExecuteLimit = "-1" ExecuteRejectedExecutionHandlerKey = "execute.limit.rejected.handler" SerializationKey = "serialization" PIDKey = "pid" SyncReportKey = "sync.report" RetryPeriodKey = "retry.period" RetryTimesKey = "retry.times" CycleReportKey = "cycle.report" DefaultBlackListRecoverBlock = 16 )
View Source
const ( MetadataReportNamespaceKey = "metadata-report.namespace" MetadataReportGroupKey = "metadata-report.group" MetadataReportUsernameKey = "metadata-report.username" MetadataReportPasswordKey = "metadata-report.password" MetadataReportProtocolKey = "metadata-report.protocol" )
metadata report keys
View Source
const ( RegistryKey = "registry" RegistryProtocol = "registry" ServiceRegistryProtocol = "service-discovery-registry" RegistryRoleKey = "registry.role" RegistryDefaultKey = "registry.default" RegistryAccessKey = "registry.accesskey" RegistrySecretKey = "registry.secretkey" RegistryTimeoutKey = "registry.timeout" RegistryLabelKey = "label" PreferredKey = "preferred" RegistryZoneKey = "zone" RegistryZoneForceKey = "zone.force" RegistryTTLKey = "registry.ttl" RegistrySimplifiedKey = "simplified" RegistryNamespaceKey = "registry.namespace" RegistryGroupKey = "registry.group" )
registry keys
View Source
const ( ApplicationKey = "application" OrganizationKey = "organization" NameKey = "name" ModuleKey = "module" AppVersionKey = "app.version" OwnerKey = "owner" EnvironmentKey = "environment" MethodKey = "method" MethodKeys = "methods" RuleKey = "rule" RuntimeKey = "runtime" BackupKey = "backup" RoutersCategory = "routers" RouteProtocol = "route" ConditionRouteProtocol = "condition" TagRouteProtocol = "tag" ProvidersCategory = "providers" RouterKey = "router" ExportKey = "export" )
View Source
const ( ConfigNamespaceKey = "config-center.namespace" ConfigGroupKey = "config-center.group" ConfigAppIDKey = "config-center.appId" ConfigClusterKey = "config-center.cluster" ConfigTimeoutKey = "config-center.timeout" ConfigUsernameKey = "config-center.username" ConfigAccessKey = "config-center.access" ConfigPasswordKey = "config-center.password" ConfigLogDirKey = "config-center.logDir" ConfigVersionKey = "config-center.configVersion" CompatibleConfigKey = "config-center.compatible_config" ConfigSecretKey = "config-center.secret" ConfigBackupConfigKey = "config-center.isBackupConfig" ConfigBackupConfigPathKey = "config-center.backupConfigPath" )
config center keys
View Source
const ( RegistryConfigPrefix = "dubbo.registries" ApplicationConfigPrefix = "dubbo.application" ConfigCenterPrefix = "dubbo.config-center" SingleRegistryConfigPrefix = "dubbo.registry" ReferenceConfigPrefix = "dubbo.reference" ServiceConfigPrefix = "dubbo.service" ConfigBasePrefix = "dubbo.base" RemotePrefix = "dubbo.remote" ServiceDiscPrefix = "dubbo.service-discovery" ProtocolConfigPrefix = "dubbo.protocols" ProviderConfigPrefix = "dubbo.provider" ConsumerConfigPrefix = "dubbo.consumer" ShutdownConfigPrefix = "dubbo.shutdown" MetadataReportPrefix = "dubbo.metadata-report" RouterConfigPrefix = "dubbo.router" TracingConfigPrefix = "dubbo.tracing" LoggerConfigPrefix = "dubbo.logger" CustomConfigPrefix = "dubbo.custom" ProfilesConfigPrefix = "dubbo.profiles" )
View Source
const ( NacosKey = "nacos" NacosGroupKey = "nacos.group" NacosDefaultRoleType = 3 NacosCacheDirKey = "nacos.cacheDir" NacosLogDirKey = "nacos.logDir" NacosBeatIntervalKey = "nacos.beatInterval" NacosEndpoint = "endpoint" NacosServiceNameSeparator = ":" NacosCategoryKey = "nacos.category" NacosProtocolKey = "protocol" NacosPathKey = "path" NacosNamespaceID = "nacos.namespaceId" NacosNotLoadLocalCache = "nacos.not.load.cache" NacosAppNameKey = "appName" NacosRegionIDKey = "nacos.regionId" NacosAccessKey = "nacos.access" NacosSecretKey = "nacos.secret" NacosOpenKmsKey = "kms" NacosUpdateThreadNumKey = "updateThreadNum" NacosLogLevelKey = "nacos.logLevel" NacosUsername = "nacos.username" NacosPassword = "nacos.password" NacosTimeout = "nacos.timeout" )
View Source
const ( PolarisKey = "polaris" PolarisDefaultRoleType = 3 PolarisConfigFilePath = "configPath" PolarisNamespace = "namespace" PolarisServiceToken = "token" PolarisServiceNameSeparator = ":" PolarisDubboPath = "DUBBOPATH" PolarisInstanceID = "polaris.instanceID" PolarisDefaultNamespace = "default" PolarisDubboGroup = "dubbo.group" PolarisClientName = "polaris-client" )
View Source
const ( TracingRemoteSpanCtx = DubboCtxKey("tracing.remote.span.ctx") TracingConfigKey = "config.tracing" )
View Source
const ( TagRouterRuleSuffix = ".tag-router" // Specify tag router suffix ConditionRouterRuleSuffix = ".condition-router" // Specify condition router suffix MeshRouteSuffix = ".MESHAPPRULE" // Specify mesh router suffix ForceUseTag = "dubbo.force.tag" // the tag in attachment Tagkey = "dubbo.tag" // key of tag AttachmentKey = DubboCtxKey("attachment") // key in context in invoker TagRouterFactoryKey = "tag" V3RouterFactoryKey = "mesh" )
Use for router module
View Source
const ( ServiceAuthKey = "auth" // name of service filter AuthenticatorKey = "authenticator" // key of authenticator DefaultAuthenticator = "accesskeys" // name of default authenticator DefaultAccessKeyStorage = "urlstorage" // name of default url storage AccessKeyStorageKey = "accessKey.storage" // key of storage RequestTimestampKey = "timestamp" // key of request timestamp RequestSignatureKey = "signature" // key of request signature AKKey = "ak" // AK key SignatureStringFormat = "%s#%s#%s#%s" // signature format ParameterSignatureEnableKey = "param.sign" // key whether enable signature Consumer = "consumer" // consumer AccessKeyIDKey = ".accessKeyId" // key of access key id SecretAccessKeyKey = ".secretAccessKey" // key of secret access key )
Auth filter
View Source
const ( MetaConfigRemote = "remote" MetaConfigLocal = "local" KeySeparator = ":" DefaultPathTag = "metadata" KeyRevisionPrefix = "revision" MetadataServiceName = "org.apache.dubbo.metadata.MetadataService" // metadata service )
View Source
const ( SubscribedServiceNamesKey = "subscribed-services" ProvidedBy = "provided-by" ExportedServicesRevisionPropertyName = "dubbo.metadata.revision" SubscribedServicesRevisionPropertyName = "dubbo.subscribed-services.revision" ServiceInstanceSelector = "service-instance-selector" MetadataStorageTypePropertyName = "dubbo.metadata.storage-type" DefaultMetadataStorageType = "local" RemoteMetadataStorageType = "remote" ServiceInstanceEndpoints = "dubbo.endpoints" MetadataServicePrefix = "dubbo.metadata-service." MetadataServiceURLParamsPropertyName = MetadataServicePrefix + "url-params" MetadataServiceURLsPropertyName = MetadataServicePrefix + "urls" ServiceDiscoveryKey = "service_discovery" // indicate which service discovery instance will be used )
service discovery
View Source
const ( GenericSerializationDefault = "true" GenericSerializationGson = "gson" )
Generic Filter
View Source
const ( AdaptiveServiceUpdaterKey = "adaptive-service.updater" AdaptiveServiceRemainingKey = "adaptive-service.remaining" AdaptiveServiceInflightKey = "adaptive-service.inflight" AdaptiveServiceEnabledKey = "adaptive-service.enabled" AdaptiveServiceIsEnabled = "1" )
AdaptiveService Filter goland:noinspection ALL
View Source
const ( LoadBalanceKeyConsistentHashing = "consistenthashing" LoadBalanceKeyLeastActive = "leastactive" LoadBalanceKeyRandom = "random" LoadBalanceKeyRoundRobin = "roundrobin" LoadBalanceKeyP2C = "p2c" )
View Source
const ( SHessian2 byte = 2 SProto byte = 21 )
View Source
const ( Hessian2Serialization = "hessian2" ProtobufSerialization = "protobuf" MsgpackSerialization = "msgpack" )
View Source
const ( Version = "3.0.0" // apache/dubbo-go version Name = "dubbogo" // module name DATE = "2021/05/14" // release date )
View Source
const (
AsyncKey = "async" // it's value should be "true" or "false" of string type
)
View Source
const (
ClientNameKey = "remote-client-name"
)
View Source
const (
CommaSplitPattern = "\\s*[,]+\\s*"
)
View Source
const (
ConfiguratorSuffix = ".configurators"
)
View Source
const (
DubboGoCtxKey = DubboCtxKey("dubbogo-ctx")
)
View Source
const (
EtcdV3Key = "etcdv3"
)
View Source
const (
FileKey = "file"
)
View Source
const (
NonImportErrorMsgFormat = "Cluster for %s is not existing, make sure you have import the package."
)
View Source
const (
// PassThroughProxyFactoryKey is key of proxy factory with raw data input service
PassThroughProxyFactoryKey = "dubbo-raw"
)
View Source
const (
ServiceDiscoveryDefaultGroup = "DEFAULT_GROUP"
)
View Source
const (
ZookeeperKey = "zookeeper"
)
Variables ¶
View Source
var MsToNanoRate = int64(time.Millisecond / time.Nanosecond)
MsToNanoRate will be 10^6, 1ms = 10^6ns
Functions ¶
This section is empty.
Types ¶
type DubboCtxKey ¶
type DubboCtxKey string
Click to show internal directories.
Click to hide internal directories.