Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose namespace data #2804

Merged
merged 4 commits into from
May 5, 2022
Merged

Expose namespace data #2804

merged 4 commits into from
May 5, 2022

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented May 5, 2022

What changed?
Expose namespace data

Why?
Expose namespace data so we can use the customized data.

How did you test it?
Unit test

Potential risks

Is hotfix candidate?

@yux0 yux0 requested review from meiliang86 and yiminc May 5, 2022 04:52
@yux0 yux0 requested a review from a team as a code owner May 5, 2022 04:52
Comment on lines 227 to 233
func (ns *Namespace) GetCustomData() map[string]string {
res := make(map[string]string, len(ns.info.Data))
for k, v := range ns.info.Data {
res[k] = v
}
return res
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to pass in a key so you only return the value and no need to make a copy of the map.

@yux0 yux0 enabled auto-merge (squash) May 5, 2022 18:56
@yux0 yux0 merged commit f1fb635 into temporalio:master May 5, 2022
@yux0 yux0 deleted the ns-data branch May 5, 2022 19:24
yux0 added a commit that referenced this pull request May 5, 2022
* Expose namespace data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants