MCPcopy Create free account
hub / github.com/temporalio/temporal / componentUserMetadata

Method componentUserMetadata

chasm/tree.go:1476–1484  ·  view source on GitHub ↗

componentUserMetadata returns the user metadata stored on the given component, preferring a pending write staged in the current transaction.

(component Component)

Source from the content-addressed store, hash-verified

1474// componentUserMetadata returns the user metadata stored on the given
1475// component, preferring a pending write staged in the current transaction.
1476func (n *Node) componentUserMetadata(component Component) *sdkpb.UserMetadata {
1477 if md, ok := n.pendingUserMetadata[component]; ok {
1478 return md
1479 }
1480 if refNode, ok := n.valueToNode[component]; ok && refNode.isComponent() {
1481 return refNode.serializedNode.GetMetadata().GetComponentAttributes().GetUserMetadata()
1482 }
1483 return nil
1484}
1485
1486// setComponentUserMetadata stages a user-metadata write for the given component.
1487// Applied during CloseTransaction.

Callers 1

UserMetadataMethod · 0.80

Calls 4

isComponentMethod · 0.80
GetMetadataMethod · 0.65
GetUserMetadataMethod · 0.45

Tested by

no test coverage detected