core

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPLIT                    = "/"
	RegistryRootKey          = "cse-sr"
	RegistrySysKey           = "sys"
	RegistryServiceKey       = "ms"
	RegistryInstanceKey      = "inst"
	RegistryFile             = "files"
	RegistryIndex            = "indexes"
	RegistryRuleKey          = "rules"
	RegistryRuleIndexKey     = "rule-indexes"
	RegistryDomainKey        = "domains"
	RegistryProjectKey       = "projects"
	RegistryAliasKey         = "alias"
	RegistryTagKey           = "tags"
	RegistrySchemaKey        = "schemas"
	RegistrySchemaSummaryKey = "schema-sum"
	RegistryLeaseKey         = "leases"
	RegistryDependencyKey    = "deps"
	RegistryDepsRuleKey      = "dep-rules"
	RegistryDepsQueueKey     = "dep-queue"
	RegistryMetricsKey       = "metrics"
	DepsQueueUUID            = "0"
	DepsConsumer             = "c"
	DepsProvider             = "p"
)
View Source
const (
	RegistryDomain        = "default"
	RegistryProject       = "default"
	RegistryDomainProject = "default/default"

	RegistryAppID        = "default"
	RegistryServiceName  = "SERVICECENTER"
	RegistryServiceAlias = "SERVICECENTER"

	RegistryDefaultLeaseRenewalinterval int32 = 30
	RegistryDefaultLeaseRetrytimes      int32 = 3

	CtxScSelf     = "_sc_self"
	CtxScRegistry = "_registryOnly"
)
View Source
const (
	InitVersion = "0"
)

Variables

Functions

func AddDefaultContextValue

func AddDefaultContextValue(ctx context.Context) context.Context

func Configure

func Configure()

func CreateServiceRequest

func CreateServiceRequest() *registry.CreateServiceRequest

func GenerateAccountKey

func GenerateAccountKey(name string) string

func GenerateConsumerDependencyQueueKey

func GenerateConsumerDependencyQueueKey(domainProject, consumerID, uuid string) string

func GenerateConsumerDependencyRuleKey

func GenerateConsumerDependencyRuleKey(domainProject string, in *registry.MicroServiceKey) string

func GenerateDomainKey

func GenerateDomainKey(domain string) string

func GenerateInstanceKey

func GenerateInstanceKey(domainProject string, serviceID string, instanceID string) string

func GenerateInstanceLeaseKey

func GenerateInstanceLeaseKey(domainProject string, serviceID string, instanceID string) string

func GenerateMetricsKey

func GenerateMetricsKey(name, utc, domain string) string

func GenerateProjectKey

func GenerateProjectKey(domain, project string) string

func GenerateProviderDependencyRuleKey

func GenerateProviderDependencyRuleKey(domainProject string, in *registry.MicroServiceKey) string

func GenerateRBACSecretKey

func GenerateRBACSecretKey() string

func GenerateRuleIndexKey

func GenerateRuleIndexKey(domainProject string, serviceID string, attr string, pattern string) string

func GenerateServiceAliasKey

func GenerateServiceAliasKey(key *registry.MicroServiceKey) string

func GenerateServiceDependencyRuleKey

func GenerateServiceDependencyRuleKey(serviceType string, domainProject string, in *registry.MicroServiceKey) string

func GenerateServiceIndexKey

func GenerateServiceIndexKey(key *registry.MicroServiceKey) string

func GenerateServiceKey

func GenerateServiceKey(domainProject string, serviceID string) string

func GenerateServiceRuleKey

func GenerateServiceRuleKey(domainProject string, serviceID string, ruleID string) string

func GenerateServiceSchemaKey

func GenerateServiceSchemaKey(domainProject string, serviceID string, schemaID string) string

func GenerateServiceSchemaSummaryKey

func GenerateServiceSchemaSummaryKey(domainProject string, serviceID string, schemaID string) string

func GenerateServiceTagKey

func GenerateServiceTagKey(domainProject string, serviceID string) string

func GetDomainRootKey

func GetDomainRootKey() string

func GetExistenceRequest

func GetExistenceRequest() *registry.GetExistenceRequest

func GetInfoFromDependencyQueueKV

func GetInfoFromDependencyQueueKV(key []byte) (consumerID, domainProject, uuid string)

func GetInfoFromDependencyRuleKV

func GetInfoFromDependencyRuleKV(key []byte) (t string, _ *registry.MicroServiceKey)

func GetInfoFromDomainKV

func GetInfoFromDomainKV(key []byte) (domain string)

func GetInfoFromInstKV

func GetInfoFromInstKV(key []byte) (serviceID, instanceID, domainProject string)

func GetInfoFromProjectKV

func GetInfoFromProjectKV(key []byte) (domainProject string)

func GetInfoFromRuleKV

func GetInfoFromRuleKV(key []byte) (serviceID, ruleID, domainProject string)

func GetInfoFromSchemaKV

func GetInfoFromSchemaKV(key []byte) (domainProject, serviceID, schemaID string)

func GetInfoFromSchemaSummaryKV

func GetInfoFromSchemaSummaryKV(key []byte) (domainProject, serviceID, schemaID string)

func GetInfoFromSvcAliasKV

func GetInfoFromSvcAliasKV(key []byte) *registry.MicroServiceKey

func GetInfoFromSvcIndexKV

func GetInfoFromSvcIndexKV(key []byte) *registry.MicroServiceKey

func GetInfoFromSvcKV

func GetInfoFromSvcKV(key []byte) (serviceID, domainProject string)

func GetInfoFromTagKV

func GetInfoFromTagKV(key []byte) (serviceID, domainProject string)

func GetInstanceLeaseRootKey

func GetInstanceLeaseRootKey(domainProject string) string

func GetInstanceRootKey

func GetInstanceRootKey(domainProject string) string

func GetMetricsRootKey

func GetMetricsRootKey() string

func GetProjectRootKey

func GetProjectRootKey(domain string) string

func GetRootKey

func GetRootKey() string

func GetServerInfoKey

func GetServerInfoKey() string

func GetServiceAliasRootKey

func GetServiceAliasRootKey(domainProject string) string

func GetServiceAppKey

func GetServiceAppKey(domainProject, env, appID string) string

func GetServiceDependencyQueueRootKey

func GetServiceDependencyQueueRootKey(domainProject string) string

func GetServiceDependencyRootKey

func GetServiceDependencyRootKey(domainProject string) string

func GetServiceDependencyRuleRootKey

func GetServiceDependencyRuleRootKey(domainProject string) string

func GetServiceIndexRootKey

func GetServiceIndexRootKey(domainProject string) string

func GetServiceRequest

func GetServiceRequest(serviceID string) *registry.GetServiceRequest

func GetServiceRootKey

func GetServiceRootKey(domainProject string) string

func GetServiceRuleIndexRootKey

func GetServiceRuleIndexRootKey(domainProject string) string

func GetServiceRuleRootKey

func GetServiceRuleRootKey(domainProject string) string

func GetServiceSchemaRootKey

func GetServiceSchemaRootKey(domainProject string) string

func GetServiceSchemaSummaryRootKey

func GetServiceSchemaSummaryRootKey(domainProject string) string

func GetServiceTagRootKey

func GetServiceTagRootKey(domainProject string) string

func HeartbeatRequest

func HeartbeatRequest() *registry.HeartbeatRequest

func Initialize

func Initialize()

func IsDefaultDomainProject

func IsDefaultDomainProject(domainProject string) bool

func IsSCInstance

func IsSCInstance(ctx context.Context) bool

func IsShared

func IsShared(key *registry.MicroServiceKey) bool

func KvToResponse

func KvToResponse(key []byte) (keys []string)

func ParseCommandLine

func ParseCommandLine()

func RegisterInstanceRequest

func RegisterInstanceRequest() *registry.RegisterInstanceRequest

func SetSharedMode

func SetSharedMode()

func UnregisterInstanceRequest

func UnregisterInstanceRequest() *registry.UnregisterInstanceRequest

Types

This section is empty.

Directories

Path Synopsis
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.

Jump to

Keyboard shortcuts

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