# README
Goverland Datasource Snapshot
Goverland Datasource Snapshot is a micro service designed to manage and synchronize various data sources for Goverland ecosystem. The microservice also leverages technologies such as gRPC and NATS. PostgreSQL is used as database. The application exposes Prometheus metrics.
Usage
- The application initializes various services and workers to manage proposals, spaces, votes, and messages.
- Also it implements interface for voting on Snapshot via gRPC calls.
Features
- Snapshot SDK Integration: facilitates interaction with Snapshot services for proposals, spaces, votes, and messages.
- Event Publishing: utilizes NATS for event-driven architecture.
- gRPC Services: provides gRPC-based APIs for interacting with the Snapshot from internal services.
- Database: Integrates with PostgreSQL for storing and managing data.
- Metrics and Monitoring: exposes Prometheus metrics for monitoring.
- Health Checks: Implements health check endpoints to monitor the application's status.
For Developers
Pre-requisites
- GoLang 1.21
- Docker
Run Locally
- Clone the repository:
git clone https://github.com/goverland-labs/goverland-datasource-snapshot.git cd goverland-datasource-snapshot
- Install the required Go dependencies:
go mod download go mod verify
- Spin up the necessary containers:
docker-compose up -d
- Run the application. Don't forget to provide your own Snapshot API key:
POSTGRES_DSN="host=localhost port=5432 user=postgres password=postgres dbname=postgres sslmode=disable" \ SNAPSHOT_API_KEY=YOUR_KEY \ go run main.go
To tear down docker compose environment
docker-compose down
Prometheus
Prometheus metrics are exposed at http://localhost:2112/metrics.
Docker Image
-
Build the Docker Image:
- Navigate to the root directory containing a
Dockerfile
. - Run the following command to build the Docker image:
docker build -t goverland-datasource-snapshot .
- Navigate to the root directory containing a
-
Run the Docker Container:
- After the image is built, you can run it as a container. Use the following command to start the container:
docker run -d --name goverland-datasource-snapshot -p 11000:11000 goverland-datasource-snapshot
- After the image is built, you can run it as a container. Use the following command to start the container:
Contribution Rules
To request or propose new features or bug fixes, create a new issue using specific template. If you wish to contribute to the project, please read CONTRIBUTING guide carefully or contact us via Discord.
Changelog
Check all updates in our CHANGELOG.
License
Goverland Datasource Snapshot is GPL-3.0 licensed.