首页  

temporal namespace 信息获取 关键代码及堆栈信息     所属分类 temporal 浏览量 174
describeNamespace
temporal/common/persistence/sql/sqlplugin/postgresql/namespace.go

selectFromNamespace

case filter.ID != nil:
		err = pdb.conn.GetContext(ctx,
			&row,
			getNamespaceByIDQuery,
			partitionID,
			*filter.ID,
		)
case filter.Name != nil:
		err = pdb.conn.GetContext(ctx,
			&row,
			getNamespaceByNameQuery,
			partitionID,
			*filter.Name,
		)
		
	getNamespacePart = `SELECT id, name, is_global, data, data_encoding, notification_version FROM namespaces`

	getNamespaceByIDQuery   = getNamespacePart + ` WHERE partition_id=$1 AND id = $2`
	getNamespaceByNameQuery = getNamespacePart + ` WHERE partition_id=$1 AND name = $2`


NamespaceRow struct {
		ID                  primitives.UUID
		Name                string
		Data                []byte
		DataEncoding        string
		IsGlobal            bool
		NotificationVersion int64
	}


	
temporal/common/primitives/uuid.go
type UUID []byte

使用 github.com/google/uuid

 go google uuid 例子 



go.temporal.io/server/common/persistence/sql/sqlplugin/postgresql.(*db).SelectFromNamespace (/Users/dugang/dugang/work/temporal/temporal/common/persistence/sql/sqlplugin/postgresql/namespace.go:94) go.temporal.io/server/common/persistence/sql.(*DbConn).SelectFromNamespace (Unknown Source:1) go.temporal.io/server/common/persistence/sql.(*sqlMetadataManagerV2).GetNamespace (/Users/dugang/dugang/work/temporal/temporal/common/persistence/sql/metadata.go:119) go.temporal.io/server/common/persistence.(*metadataManagerImpl).GetNamespace (/Users/dugang/dugang/work/temporal/temporal/common/persistence/metadata_manager.go:86) go.temporal.io/server/common/persistence.(*metadataRateLimitedPersistenceClient).GetNamespace (/Users/dugang/dugang/work/temporal/temporal/common/persistence/persistenceRateLimitedClients.go:543) go.temporal.io/server/common/persistence.(*metadataPersistenceClient).GetNamespace (/Users/dugang/dugang/work/temporal/temporal/common/persistence/persistenceMetricClients.go:765) go.temporal.io/server/common/namespace.(*HandlerImpl).DescribeNamespace (/Users/dugang/dugang/work/temporal/temporal/common/namespace/handler.go:344) go.temporal.io/server/service/frontend.(*WorkflowHandler).DescribeNamespace (/Users/dugang/dugang/work/temporal/temporal/service/frontend/workflowHandler.go:298) go.temporal.io/server/service/frontend.(*DCRedirectionHandlerImpl).DescribeNamespace (/Users/dugang/dugang/work/temporal/temporal/service/frontend/dcRedirectionHandler.go:153) go.temporal.io/api/workflowservice/v1._WorkflowService_DescribeNamespace_Handler.func1 (/Users/dugang/go/pkg/mod/go.temporal.io/api@v1.7.1-0.20220211205804-a4f685c2448b/workflowservice/v1/service.pb.go:1071) go.temporal.io/server/common/rpc/interceptor.(*SDKVersionInterceptor).Intercept (/Users/dugang/dugang/work/temporal/temporal/common/rpc/interceptor/sdk_version.go:63) go.temporal.io/server/common/rpc/interceptor.(*SDKVersionInterceptor).Intercept-fm (/Users/dugang/dugang/work/temporal/temporal/common/rpc/interceptor/sdk_version.go:53) google.golang.org/grpc.chainUnaryInterceptors.func1.1 (/Users/dugang/go/pkg/mod/google.golang.org/grpc@v1.44.0/server.go:1116) go.temporal.io/server/common/authorization.(*interceptor).Interceptor (/Users/dugang/dugang/work/temporal/temporal/common/authorization/interceptor.go:152) go.temporal.io/server/common/authorization.(*interceptor).Interceptor-fm (/Users/dugang/dugang/work/temporal/temporal/common/authorization/interceptor.go:66) google.golang.org/grpc.chainUnaryInterceptors.func1.1 (/Users/dugang/go/pkg/mod/google.golang.org/grpc@v1.44.0/server.go:1119) go.temporal.io/server/common/rpc/interceptor.(*NamespaceCountLimitInterceptor).Intercept (/Users/dugang/dugang/work/temporal/temporal/common/rpc/interceptor/namespace_count_limit.go:99) go.temporal.io/server/common/rpc/interceptor.(*NamespaceCountLimitInterceptor).Intercept-fm (/Users/dugang/dugang/work/temporal/temporal/common/rpc/interceptor/namespace_count_limit.go:76) google.golang.org/grpc.chainUnaryInterceptors.func1.1 (/Users/dugang/go/pkg/mod/google.golang.org/grpc@v1.44.0/server.go:1119) go.temporal.io/server/common/rpc/interceptor.(*NamespaceRateLimitInterceptor).Intercept (/Users/dugang/dugang/work/temporal/temporal/common/rpc/interceptor/namespace_rate_limit.go:89)

上一篇     下一篇
protobuf3二进制数据转java对象

PostgreSQL 连接信息查询

temporal 代码阅读记录

go.sum 生成

go google uuid 例子

java hex util