Skip to content

lyn1505/postgres-connector-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgres-connector-demo

To run the demo

  1. Clone the repository
  2. Run the databases. This will run docker-compose up under the hood, and set up 2 masters and 2 slaves:
make up master=1 slave=1 # can set different numbers to scale
  1. Run the tests in db_test.go. The databases will log SQL queries it executes, so to see the logs, run any of these:
docker-compose logs -f pg-demo-postgresql-master-users-1
docker-compose logs -f pg-demo-postgresql-master-games-1
docker-compose logs -f pg-demo-postgresql-slave-users-1
docker-compose logs -f pg-demo-postgresql-slave-games-1

Read the comments in the test file to understand what each test does.

  1. When you're done:
make clean # remove containers and volumes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published