Skip to content

Commit

Permalink
Mark Nexus link converter functions as experimental (temporalio#1615)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigozhou authored Aug 30, 2024
1 parent f47e644 commit 1b6220d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion temporalnexus/link_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const (
urlPathWorkflowIDKey = "workflowID"
urlPathRunIDKey = "runID"
urlPathTemplate = "/namespaces/%s/workflows/%s/%s/history"
urlTemplate = "temporal://" + urlPathTemplate

linkWorkflowEventReferenceTypeKey = "referenceType"
linkEventReferenceEventIDKey = "eventID"
Expand All @@ -63,6 +62,8 @@ var (
)

// ConvertLinkWorkflowEventToNexusLink converts a Link_WorkflowEvent type to Nexus Link.
//
// NOTE: Experimental
func ConvertLinkWorkflowEventToNexusLink(we *commonpb.Link_WorkflowEvent) nexus.Link {
u := &url.URL{
Scheme: urlSchemeTemporalKey,
Expand All @@ -86,6 +87,8 @@ func ConvertLinkWorkflowEventToNexusLink(we *commonpb.Link_WorkflowEvent) nexus.
}

// ConvertNexusLinkToLinkWorkflowEvent converts a Nexus Link to Link_WorkflowEvent.
//
// NOTE: Experimental
func ConvertNexusLinkToLinkWorkflowEvent(link nexus.Link) (*commonpb.Link_WorkflowEvent, error) {
we := &commonpb.Link_WorkflowEvent{}
if link.Type != string(we.ProtoReflect().Descriptor().FullName()) {
Expand Down

0 comments on commit 1b6220d

Please sign in to comment.