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

feat: Add example for fabricv4 client to get connections #60

Merged
merged 4 commits into from
May 30, 2024

Conversation

thogarty
Copy link
Contributor

  • Add example to fabricv4 for getting connections
  • Shows how to create the client and use one of its simple methods on our API

@thogarty thogarty requested a review from a team as a code owner May 22, 2024 03:28
examples/services/fabricv4/get_connection/main.go Outdated Show resolved Hide resolved
retryClient.RetryWaitMax = time.Second * 60
standardClient := retryClient.StandardClient()

baseURLParsed, _ := url.Parse(baseURL)
Copy link
Contributor

Choose a reason for hiding this comment

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

(Note, I'm assuming the default URL used by the fabricv4 client is already https://api.equinix.com). To keep the example as focused as possible, I recommend taking out the customized ServerConfiguration.

examples/services/fabricv4/get_connection/main.go Outdated Show resolved Hide resolved
…pecific package, and add comments with details on package inclusion
ctreatma
ctreatma previously approved these changes May 29, 2024
@ctreatma ctreatma dismissed their stale review May 29, 2024 14:24

Code looks good but I missed a CI failure

@ctreatma
Copy link
Contributor

For some reason CI is running into an uncommitted change in the example, but I'm not sure why...maybe try running make fmt to see if that is modifying the formatting on the example.

@thogarty
Copy link
Contributor Author

For some reason CI is running into an uncommitted change in the example, but I'm not sure why...maybe try running make fmt to see if that is modifying the formatting on the example.

Correct. It was modifying imports on the example to keep github specific imports separate from the Go standard library. Good call.

@thogarty thogarty merged commit 276e9da into main May 30, 2024
3 checks passed
@thogarty thogarty deleted the fabric_example_scripts branch May 30, 2024 23:08
Copy link
Contributor

This PR is included in version 0.40.0 🎉

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