constant

package
v3.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterKeyAvailable = "available"
	ClusterKeyBroadcast = "broadcast"
	ClusterKeyFailback  = "failback"
	ClusterKeyFailfast  = "failfast"
	ClusterKeyFailover  = "failover"
	ClusterKeyFailsafe  = "failsafe"
	ClusterKeyForking   = "forking"
	ClusterKeyZoneAware = "zoneAware"
)
View Source
const (
	DUBBO             = "dubbo"
	PROVIDER_PROTOCOL = "provider"
	// compatible with 2.6.x
	OVERRIDE_PROTOCOL = "override"
	EMPTY_PROTOCOL    = "empty"
	ROUTER_PROTOCOL   = "router"
)
View Source
const (
	DEFAULT_WEIGHT = 100     //
	DEFAULT_WARMUP = 10 * 60 // in java here is 10*60*1000 because of System.currentTimeMillis() is measured in milliseconds & in go time.Unix() is second
)
View Source
const (
	DEFAULT_LOADBALANCE        = "random"
	DEFAULT_RETRIES            = "2"
	DEFAULT_RETRIES_INT        = 2
	DEFAULT_PROTOCOL           = "dubbo"
	DEFAULT_REG_TIMEOUT        = "10s"
	DEFAULT_REG_TTL            = "15m"
	DEFAULT_CLUSTER            = "failover"
	DEFAULT_FAILBACK_TIMES     = "3"
	DEFAULT_FAILBACK_TIMES_INT = 3
	DEFAULT_FAILBACK_TASKS     = 100
	DEFAULT_REST_CLIENT        = "resty"
	DEFAULT_REST_SERVER        = "go-restful"
	DEFAULT_PORT               = 20000
	DEFAULT_METADATAPORT       = 20005
	DEFAULT_SERIALIZATION      = HESSIAN2_SERIALIZATION
)
View Source
const (
	DEFAULT_KEY               = "default"
	PREFIX_DEFAULT_KEY        = "default."
	DEFAULT_SERVICE_FILTERS   = EchoFilterKey + "," + MetricsFilterKey + "," + TokenFilterKey + "," + AccessLogFilterKey + "," + TpsLimitFilterKey + "," + GenericServiceFilterKey + "," + ExecuteLimitFilterKey + "," + GracefulShutdownProviderFilterKey
	DEFAULT_REFERENCE_FILTERS = GracefulShutdownConsumerFilterKey
	GENERIC_REFERENCE_FILTERS = GenericFilterKey
	GENERIC                   = "$invoke"
	ECHO                      = "$echo"
)
View Source
const (
	ANY_VALUE           = "*"
	ANYHOST_VALUE       = "0.0.0.0"
	LOCAL_HOST_VALUE    = "192.168.1.1"
	REMOVE_VALUE_PREFIX = "-"
)
View Source
const (
	CONFIGURATORS_CATEGORY             = "configurators"
	ROUTER_CATEGORY                    = "category"
	DEFAULT_CATEGORY                   = PROVIDER_CATEGORY
	DYNAMIC_CONFIGURATORS_CATEGORY     = "dynamicconfigurators"
	APP_DYNAMIC_CONFIGURATORS_CATEGORY = "appdynamicconfigurators"
	PROVIDER_CATEGORY                  = "providers"
	CONSUMER_CATEGORY                  = "consumers"
)
View Source
const (
	SIMPLE_METADATA_SERVICE_NAME = "MetadataService"
	DEFAULT_REVISION             = "N/A"
)
View Source
const (
	DEFAULT_PROVIDER_CONF_FILE_PATH = "../profiles/dev/server.yml"
	DEFAULT_CONSUMER_CONF_FILE_PATH = "../profiles/dev/client.yml"
	DEFAULT_LOG_CONF_FILE_PATH      = "../profiles/dev/log.yml"
	DEFAULT_ROUTER_CONF_FILE_PATH   = "../profiles/dev/router.yml"
)
View Source
const (
	// CONFIG_FILE_ENV_KEY is key of environment variable dubbogo configure file path
	CONFIG_FILE_ENV_KEY = "DUBBO_GO_CONFIG_PATH"
	// APP_LOG_CONF_FILE ...
	APP_LOG_CONF_FILE = "APP_LOG_CONF_FILE"
)

nolint

View Source
const (
	GROUP_KEY                = "group"
	VERSION_KEY              = "version"
	INTERFACE_KEY            = "interface"
	MESSAGE_SIZE_KEY         = "message_size"
	PATH_KEY                 = "path"
	SERVICE_KEY              = "service"
	METHODS_KEY              = "methods"
	TIMEOUT_KEY              = "timeout"
	CATEGORY_KEY             = "category"
	CHECK_KEY                = "check"
	ENABLED_KEY              = "enabled"
	SIDE_KEY                 = "side"
	OVERRIDE_PROVIDERS_KEY   = "providerAddresses"
	BEAN_NAME_KEY            = "bean.name"
	GENERIC_KEY              = "generic"
	CLASSIFIER_KEY           = "classifier"
	TOKEN_KEY                = "token"
	LOCAL_ADDR               = "local-addr"
	REMOTE_ADDR              = "remote-addr"
	DEFAULT_REMOTING_TIMEOUT = 3000
	RELEASE_KEY              = "release"
	ANYHOST_KEY              = "anyhost"
	PORT_KEY                 = "port"
	PROTOCOL_KEY             = "protocol"
	PATH_SEPARATOR           = "/"
	COMMA_SEPARATOR          = ","
	// DUBBO_KEY                = "dubbo"
	SSL_ENABLED_KEY = "ssl-enabled"
	// PARAMS_TYPE_Key key used in pass through invoker factory, to define param type
	PARAMS_TYPE_Key  = "parameter-type-names"
	DEFAULT_Key      = "default"
	METADATATYPE_KEY = "metadata-type"
)
View Source
const (
	SERVICE_FILTER_KEY   = "service.filter"
	REFERENCE_FILTER_KEY = "reference.filter"
)
View Source
const (
	AccessLogFilterKey                   = "accesslog"
	ActiveFilterKey                      = "active"
	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 (
	TIMESTAMP_KEY                          = "timestamp"
	REMOTE_TIMESTAMP_KEY                   = "remote.timestamp"
	CLUSTER_KEY                            = "cluster"
	LOADBALANCE_KEY                        = "loadbalance"
	WEIGHT_KEY                             = "weight"
	WARMUP_KEY                             = "warmup"
	RETRIES_KEY                            = "retries"
	STICKY_KEY                             = "sticky"
	BEAN_NAME                              = "bean.name"
	FAIL_BACK_TASKS_KEY                    = "failbacktasks"
	FORKS_KEY                              = "forks"
	DEFAULT_FORKS                          = 2
	DEFAULT_TIMEOUT                        = 1000
	TPS_LIMITER_KEY                        = "tps.limiter"
	TPS_REJECTED_EXECUTION_HANDLER_KEY     = "tps.limit.rejected.handler"
	TPS_LIMIT_RATE_KEY                     = "tps.limit.rate"
	DEFAULT_TPS_LIMIT_RATE                 = "-1"
	TPS_LIMIT_INTERVAL_KEY                 = "tps.limit.interval"
	DEFAULT_TPS_LIMIT_INTERVAL             = "60000"
	TPS_LIMIT_STRATEGY_KEY                 = "tps.limit.strategy"
	EXECUTE_LIMIT_KEY                      = "execute.limit"
	DEFAULT_EXECUTE_LIMIT                  = "-1"
	EXECUTE_REJECTED_EXECUTION_HANDLER_KEY = "execute.limit.rejected.handler"
	SERIALIZATION_KEY                      = "serialization"
	PID_KEY                                = "pid"
	SYNC_REPORT_KEY                        = "sync.report"
	RETRY_PERIOD_KEY                       = "retry.period"
	RETRY_TIMES_KEY                        = "retry.times"
	CYCLE_REPORT_KEY                       = "cycle.report"
	DEFAULT_BLACK_LIST_RECOVER_BLOCK       = 16
)
View Source
const (
	REGISTRY_KEY              = "registry"
	REGISTRY_PROTOCOL         = "registry"
	SERVICE_REGISTRY_PROTOCOL = "service-discovery-registry"
	ROLE_KEY                  = "registry.role"
	REGISTRY_DEFAULT_KEY      = "registry.default"
	REGISTRY_TIMEOUT_KEY      = "registry.timeout"
	REGISTRY_LABEL_KEY        = "label"
	PREFERRED_KEY             = "preferred"
	ZONE_KEY                  = "zone"
	ZONE_FORCE_KEY            = "zone.force"
	REGISTRY_TTL_KEY          = "registry.ttl"
	SIMPLIFIED_KEY            = "simplified"
	NAMESPACE_KEY             = "namespace"
)
View Source
const (
	APPLICATION_KEY          = "application"
	ORGANIZATION_KEY         = "organization"
	NAME_KEY                 = "name"
	MODULE_KEY               = "module"
	APP_VERSION_KEY          = "app.version"
	OWNER_KEY                = "owner"
	ENVIRONMENT_KEY          = "environment"
	METHOD_KEY               = "method"
	METHOD_KEYS              = "methods"
	RULE_KEY                 = "rule"
	RUNTIME_KEY              = "runtime"
	BACKUP_KEY               = "backup"
	ROUTERS_CATEGORY         = "routers"
	ROUTE_PROTOCOL           = "route"
	CONDITION_ROUTE_PROTOCOL = "condition"
	TAG_ROUTE_PROTOCOL       = "tag"
	PROVIDERS_CATEGORY       = "providers"
	ROUTER_KEY               = "router"
	EXPORT_KEY               = "export"
)
View Source
const (
	CONFIG_NAMESPACE_KEY  = "namespace"
	CONFIG_GROUP_KEY      = "group"
	CONFIG_APP_ID_KEY     = "appId"
	CONFIG_CLUSTER_KEY    = "cluster"
	CONFIG_TIMEOUT_KEY    = "timeout"
	CONFIG_USERNAME_KEY   = "username"
	CONFIG_PASSWORD_KEY   = "password"
	CONFIG_LOG_DIR_KEY    = "logDir"
	CONFIG_VERSION_KEY    = "configVersion"
	COMPATIBLE_CONFIG_KEY = "compatible_config"
)
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"
	LoggerConfigPrefix         = "dubbo.logger"
)
View Source
const (
	NACOS_KEY                    = "nacos"
	NACOS_DEFAULT_ROLETYPE       = 3
	NACOS_CACHE_DIR_KEY          = "cacheDir"
	NACOS_LOG_DIR_KEY            = "logDir"
	NACOS_BEAT_INTERVAL_KEY      = "beatInterval"
	NACOS_ENDPOINT               = "endpoint"
	NACOS_SERVICE_NAME_SEPARATOR = ":"
	NACOS_CATEGORY_KEY           = "category"
	NACOS_PROTOCOL_KEY           = "protocol"
	NACOS_PATH_KEY               = "path"
	NACOS_NAMESPACE_ID           = "namespaceId"
	NACOS_PASSWORD               = "password"
	NACOS_USERNAME               = "username"
	NACOS_NOT_LOAD_LOCAL_CACHE   = "nacos.not.load.cache"
	NACOS_APP_NAME_KEY           = "appName"
	NACOS_REGION_ID_KEY          = "regionId"
	NACOS_ACCESS_KEY             = "access"
	NACOS_SECRET_KEY             = "secret"
	NACOS_OPEN_KMS_KEY           = "kms"
	NACOS_UPDATE_THREAD_NUM_KEY  = "updateThreadNum"
	NACOS_LOG_LEVEL_KEY          = "logLevel"
)
View Source
const (
	// TagRouterRuleSuffix Specify tag router suffix
	TagRouterRuleSuffix = ".tag-router"
	// ConditionRouterRuleSuffix Specify condition router suffix
	ConditionRouterRuleSuffix = ".condition-router"
	// ForceUseTag is the tag in attachment
	ForceUseTag = "dubbo.force.tag"
	Tagkey      = "dubbo.tag"
	// AttachmentKey in context in invoker
	AttachmentKey = DubboCtxKey("attachment")
)

Use for router module

View Source
const (
	// name of service filter
	SERVICE_AUTH_KEY = "auth"
	// key of authenticator
	AUTHENTICATOR_KEY = "authenticator"
	// name of default authenticator
	DEFAULT_AUTHENTICATOR = "accesskeys"
	// name of default url storage
	DEFAULT_ACCESS_KEY_STORAGE = "urlstorage"
	// key of storage
	ACCESS_KEY_STORAGE_KEY = "accessKey.storage"
	// key of request timestamp
	REQUEST_TIMESTAMP_KEY = "timestamp"
	// key of request signature
	REQUEST_SIGNATURE_KEY = "signature"
	// AK key
	AK_KEY = "ak"
	// signature format
	SIGNATURE_STRING_FORMAT = "%s#%s#%s#%s"
	// key whether enable signature
	PARAMETER_SIGNATURE_ENABLE_KEY = "param.sign"
	// consumer
	CONSUMER = "consumer"
	// key of access key id
	ACCESS_KEY_ID_KEY = ".accessKeyId"
	// key of secret access key
	SECRET_ACCESS_KEY_KEY = ".secretAccessKey"
)

Auth filter

View Source
const (
	METACONFIG_REMOTE  = "remote"
	METACONFIG_LOCAL   = "local"
	KEY_SEPARATOR      = ":"
	DEFAULT_PATH_TAG   = "metadata"
	KEY_REVISON_PREFIX = "revision"

	// metadata service
	METADATA_SERVICE_NAME = "org.apache.dubbo.metadata.MetadataService"
)
View Source
const (
	SUBSCRIBED_SERVICE_NAMES_KEY               = "subscribed-services"
	PROVIDED_BY                                = "provided-by"
	EXPORTED_SERVICES_REVISION_PROPERTY_NAME   = "dubbo.metadata.revision"
	SUBSCRIBED_SERVICES_REVISION_PROPERTY_NAME = "dubbo.subscribed-services.revision"
	SERVICE_INSTANCE_SELECTOR                  = "service-instance-selector"
	METADATA_STORAGE_TYPE_PROPERTY_NAME        = "dubbo.metadata.storage-type"
	DEFAULT_METADATA_STORAGE_TYPE              = "local"
	REMOTE_METADATA_STORAGE_TYPE               = "remote"
	SERVICE_INSTANCE_ENDPOINTS                 = "dubbo.endpoints"
	METADATA_SERVICE_PREFIX                    = "dubbo.metadata-service."
	METADATA_SERVICE_URL_PARAMS_PROPERTY_NAME  = METADATA_SERVICE_PREFIX + "url-params"
	METADATA_SERVICE_URLS_PROPERTY_NAME        = METADATA_SERVICE_PREFIX + "urls"

	// SERVICE_DISCOVERY_KEY indicate which service discovery instance will be used
	SERVICE_DISCOVERY_KEY = "service_discovery"
)

service discovery

View Source
const (
	GenericSerializationDefault = "true"
	// disable "protobuf-json" temporarily
	//GenericSerializationProtobuf = "protobuf-json"
	GenericSerializationGson = "gson"
)
View Source
const (
	LoadBalanceKeyConsistentHashing = "consistenthashing"
	LoadBalanceKeyLeastActive       = "leastactive"
	LoadBalanceKeyRandom            = "random"
	LoadBalanceKeyRoundRobin        = "roundrobin"
)
View Source
const (
	S_Hessian2 byte = 2
	S_Proto    byte = 21
)
View Source
const (
	HESSIAN2_SERIALIZATION = "hessian2"
	PROTOBUF_SERIALIZATION = "protobuf"
	MSGPACK_SERIALIZATION  = "msgpack"
)
View Source
const (
	// Version apache/dubbo-go version
	Version = "3.0.0"
	// Name module name
	Name = "dubbogo"
	// Date release date
	DATE = "2021/05/14"
)
View Source
const (
	ASYNC_KEY = "async" // it's value should be "true" or "false" of string type
)
View Source
const (
	COMMA_SPLIT_PATTERN = "\\s*[,]+\\s*"
)
View Source
const (
	CONFIGURATORS_SUFFIX = ".configurators"
)
View Source
const (
	DUBBOGO_CTX_KEY = DubboCtxKey("dubbogo-ctx")
)
View Source
const (
	ETCDV3_KEY = "etcdv3"
)
View Source
const (
	FILE_KEY = "file"
)
View Source
const (
	// PassThroughProxyFactoryKey is key of proxy factory with raw data input service
	PassThroughProxyFactoryKey = "dubbo-raw"
)
View Source
const (
	SERVICE_DISCOVERY_DEFAULT_GROUP = "DEFAULT_GROUP"
)
View Source
const (
	TRACING_REMOTE_SPAN_CTX = DubboCtxKey("tracing.remote.span.ctx")
)
View Source
const (
	ZOOKEEPER_KEY = "zookeeper"
)

Variables

The value will be 10^6 1ms = 10^6ns

Functions

This section is empty.

Types

type DubboCtxKey

type DubboCtxKey string

Jump to

Keyboard shortcuts

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