temporal 代码阅读记录
所属分类 temporal
浏览量 663
temporal server grpc 接口实现
AdminHandler gRPC handler interface for adminservice
WorkflowHandler gRPC handler interface for workflowservice
Handler gRPC handler interface for historyservice
Handler gRPC handler interface for matchingservice
temporal/service/frontend/adminHandler.go
temporal/service/frontend/workflowHandler.go
temporal/service/history/handler.go
temporal/service/matching/handler.go
DLQMessageHandler is the interface handles namespace DLQ messages
DLQ messages ?
DLQ(Dead Letter Queue) ?
temporal/common/persistence/dataInterfaces.go
// ClusterMetadataManager is used to manage cluster-wide metadata and configuration
ClusterMetadataManager interface {
Closeable
GetName() string
GetClusterMembers(request *GetClusterMembersRequest) (*GetClusterMembersResponse, error)
UpsertClusterMembership(request *UpsertClusterMembershipRequest) error
PruneClusterMembership(request *PruneClusterMembershipRequest) error
ListClusterMetadata(request *ListClusterMetadataRequest) (*ListClusterMetadataResponse, error)
GetCurrentClusterMetadata() (*GetClusterMetadataResponse, error)
GetClusterMetadata(request *GetClusterMetadataRequest) (*GetClusterMetadataResponse, error)
SaveClusterMetadata(request *SaveClusterMetadataRequest) (bool, error)
DeleteClusterMetadata(request *DeleteClusterMetadataRequest) error
}
temporal/common/util.go
// WorkflowIDToHistoryShard is used to map namespaceID-workflowID pair to a shardID
func WorkflowIDToHistoryShard(
namespaceID string,
workflowID string,
numberOfShards int32,
) int32 {
idBytes := []byte(namespaceID + "_" + workflowID)
hash := farm.Fingerprint32(idBytes)
return int32(hash%uint32(numberOfShards)) + 1 // ShardID starts with 1
}
上一篇
下一篇
GO json 序列化与反序列化
protobuf3二进制数据转java对象
PostgreSQL 连接信息查询
temporal namespace 信息获取 关键代码及堆栈信息
go.sum 生成
go google uuid 例子