Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions temporalnexus/link_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,25 @@ func ConvertLinkWorkflowEventToNexusLink(we *commonpb.Link_WorkflowEvent) nexus.
}
}

// ConvertWorkflowLinkToNexusLink converts a Link_Workflow into a Nexus Link.
//
// NOTE: Experimental
func ConvertWorkflowLinkToNexusLink(wl *commonpb.Link_Workflow) nexus.Link {
return nexus.Link{
URL: &url.URL{
Scheme: urlSchemeTemporalKey,
Path: fmt.Sprintf(urlPathWorkflowEventTemplate, wl.GetNamespace(), wl.GetWorkflowId(), wl.GetRunId()),
RawPath: fmt.Sprintf(
urlPathWorkflowEventTemplate,
url.PathEscape(wl.GetNamespace()),
url.PathEscape(wl.GetWorkflowId()),
url.PathEscape(wl.GetRunId()),
),
},
Type: string(wl.ProtoReflect().Descriptor().FullName()),
}
}

// ConvertNexusLinkToLinkWorkflowEvent converts a Nexus Link to Link_WorkflowEvent.
//
// NOTE: Experimental
Expand Down
Loading