5 releases (1 stable)
1.0.0 | Oct 2, 2022 |
---|---|
0.9.1 | Jan 12, 2022 |
0.9.0 | Oct 29, 2021 |
0.8.1 | Sep 15, 2021 |
0.8.0 | Sep 15, 2021 |
#219 in Email
35KB
580 lines
Check If Email Exists GRPC
This crate is a wrapper around the HTTP version of check-if-email-exists. It exposes a Grpc API instead of Rest.
If you are looking for a SaaS solution for your email validation, then please check Reacher by the original creator of check-if-email-exists
.
Why would you use this version?
- To enjoy the benefits of Grpc performance vs Http in a microservice architecture
- To increase performance even more by using a Redis cache. This would be useful if the same email is validated more than once in a short period of time
- You need observability and audit trails for email validation in your pipelines. This crate uses tracing for that
How to run
Docker container
There is a docker image here. It supports the same environment variables than the executable.
If you're using Docker as container runtime, then you may want to use the --init
option in order to pass signals to the process.
Kubernetes
See the helm chart in this repo
Executable
For this, you'd need to build the application using cargo build
How to connect clients
Using an auto-generated grpc client (no Rust needed!)
The proto
files are published in the Buf Schema Registry. You can then use Buf to generate the code in the language of your choice. Just follow the docs
In Rust
This crate exports a grpc client in the module proto::v0::service_client
How to configure
There are several environment variables:
BIND_ADDRESS | Description | Default Value |
---|---|---|
REDIS_HOST | Redis IP | 127.0.0.1 |
REDIS_PORT | Redis port | 6379 |
REDIS_DB | Redis database to connect to | 0 |
REDIS_USERNAME | Redis username | "" |
REDIS_PASSWORD | Redis password | "" |
CACHE_EXP_SECONDS | How long each validation output is stored in Redis (in seconds) | 86400 |
RUST_LOG | Logging level | check_if_email_exists_grpc=info |
License
This project is published under the AGPL-3.0, or Affero General Public License, version 3, as per the license requirements of check-if-email-exists
Dependencies
~24–39MB
~639K SLoC