Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add singleton principle to RestService #198

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

Open
Claimundefine wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from DGS-19297-create-singleton-for-rest-client

Conversation

@Claimundefine
Copy link
Contributor

@Claimundefine Claimundefine commented Dec 4, 2024

RestService would be created multiple times for both the DekRegistry and SchemaRegistry clients. This would specifically be an issue as the OAuth client would also be created twice, with two tokens to manage.

private oauthClient?: OAuthClient;
private oauthBearer: boolean = false;

constructor(baseURLs: string[], isForward?: boolean, axiosDefaults?: CreateAxiosDefaults,
Copy link
Contributor Author

@Claimundefine Claimundefine Dec 4, 2024

Choose a reason for hiding this comment

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

This would normally be private, but this would break the jest mocks and RestService is not exposed to the user regardless.

Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /