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

Abstract common logic for clients #50

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

ZackarySantana
Copy link
Contributor

Abstracting this logic should help keep it maintainable. Since each client should use a unique certificate, this was kept as a function rather than saving one certificate.

@@ -25,44 +25,37 @@ export const proto = loadPackageDefinition(
packageDefinition,
) as unknown as ProtoGrpcType;

export const usersRustClient = new proto.proto.UsersService(
URI_USERS_RUST,
const getCertificate = () =>
Copy link
Owner

@mpiorowski mpiorowski Aug 14, 2023

Choose a reason for hiding this comment

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

Good idea, can i just ask for a small change? I am a type fo guy that use const for variables, and function for functions ;p

So just change the keyword? :) And there is a missing return type.

@mpiorowski mpiorowski merged commit 2eb6b1e into mpiorowski:main Aug 15, 2023
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