113
114
// Key construction
115
>
func constructHistoryKey(path, namespaceID, workflowID, runID string, version int64, batchIdx int) string {
util.go
116
>
prefix := constructHistoryKeyPrefixWithVersion(path, namespaceID, workflowID, runID, version)
117
>
return fmt.Sprintf("%s%d", prefix, batchIdx)
118
>
}
119
120
>
func constructHistoryKeyPrefixWithVersion(path, namespaceID, workflowID, runID string, version int64) string {
util.go
121
>
prefix := constructHistoryKeyPrefix(path, namespaceID, workflowID, runID)
122
>
return fmt.Sprintf("%s/%v/", prefix, version)
123
>
}
124
125
>
func constructHistoryKeyPrefix(path, namespaceID, workflowID, runID string) string {
util.go
126
>
return strings.TrimLeft(strings.Join([]string{path, namespaceID, "history", workflowID, runID}, "/"), "/")
127
>
}
128
129
func constructTimeBasedSearchKey(path, namespaceID, primaryIndexKey, primaryIndexValue, secondaryIndexKey string, t time.Time, precision string) string {