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

Added <summary> to GetCARoots, added GetCARoots with QueryOptions parameter #338

Merged

Conversation

IvanKolchanov
Copy link
Contributor

No description provided.

@IvanKolchanov
Copy link
Contributor Author

@marcin-krystianc the PR with fixes to #332

Consul/Agent.cs Outdated
/// GetCARoots returns root certificates in the cluster
/// </summary>
/// <param name="ct">Cancellation Token</param>
/// <returns>Root certificates</returns>
public async Task<QueryResult<CARoots>> GetCARoots(CancellationToken ct = default)
{
return await _client.Get<CARoots>("v1/agent/connect/ca/roots", QueryOptions.Default).Execute(ct).ConfigureAwait(false);
Copy link
Contributor

@marcin-krystianc marcin-krystianc Jun 19, 2024

Choose a reason for hiding this comment

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

Can you call the other overload to avoid repeating the implementation.

Suggested change
return await _client.Get<CARoots>("v1/agent/connect/ca/roots", QueryOptions.Default).Execute(ct).ConfigureAwait(false);
return await GetCARoots(QueryOptions.Default, ct);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, makes sense. Shouldn't it be "return await GetCARoots(QueryOptions.Default, ct).ConfigureAwait(false);" though?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, you are right.

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

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

Thanks!

@marcin-krystianc marcin-krystianc merged commit 96dbb75 into G-Research:master Jun 19, 2024
243 checks passed
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.

2 participants