Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Use Store to Get resources #29

Merged
merged 1 commit into from
Mar 24, 2017
Merged

Use Store to Get resources #29

merged 1 commit into from
Mar 24, 2017

Conversation

ash2k
Copy link
Contributor

@ash2k ash2k commented Mar 24, 2017

Should reduce number of api calls significantly.

@ash2k ash2k self-assigned this Mar 24, 2017
@ash2k ash2k force-pushed the use-store-in-worker branch from 1182f68 to 382d8f1 Compare March 24, 2017 04:23
@@ -157,58 +144,94 @@ func (wrk *worker) checkResource(bundle *smith.Bundle, res *smith.Resource) (isR
// UID: bundle.Metadata.UID,
//}))

// 3. Create of update resource
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: of -> or

var ok bool
response, ok = obj.(*unstructured.Unstructured)
if !ok {
response = new(unstructured.Unstructured)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference between new(unstructured.Unstructured) and unstructured.Unstructured{}?
With the latter you can set the Object value inside.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No practical difference. Already changed it locally.

Should reduce number of api calls significantly.
@ash2k ash2k force-pushed the use-store-in-worker branch from 382d8f1 to 35c8711 Compare March 24, 2017 04:39
@ash2k ash2k merged commit df98937 into master Mar 24, 2017
@ash2k ash2k deleted the use-store-in-worker branch March 24, 2017 04:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants